techpr0
asked on
Change date format in filemaker pro
I need to make a script that turns the following date format 2010-08-20 to 8/20/2010
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OK, the ?? shows in the field because FM doesn't think it is a date. So, you have a script that does the import right? When the import is complete it should have a "Selection" (a found set) of records and you can run this piece of code on that selection. Just set field script step to the code above, but replace "str" with the name of the field.
ASKER
it's formating the date correctly but only one record even though i am doing it right after the import. How do i get it to do it on all records for the given field?
I am using the following to get the correct date as you stated.
Set Field[DateField;Date (Middle ( DateField; 6; 2) ; Middle ( DateField; 9; 2) ; Middle ( DateField; 1; 4))
I am using the following to get the correct date as you stated.
Set Field[DateField;Date (Middle ( DateField; 6; 2) ; Middle ( DateField; 9; 2) ; Middle ( DateField; 1; 4))
You could use the "Replace Field Contents" script step or simply loop through the current found set.
ASKER
Worked. Thanks.
ASKER
All records in this field will be need to be changed to the correct formating regardless of date so how do i handle the selection of the field.
Will this solution still work based on this info?