Mariusz Posted November 12, 2002 Posted November 12, 2002 I'm having difficulty entering data from the script(date) into a date field of FMP. Is there a solution? Mariusz
jfmcel Posted November 13, 2002 Posted November 13, 2002 Here is a subroutine that will take the AppleScript date and convert it to a text string that FileMaker will interpret as a date. It will automatically adjust for US or European time formats. [ A complete description of the subroutine can be found at http://www.macadillo.com/ATW/shortdate.html ] on FormatDate(theDate) set thisDay to text -2 thru -1 of ("0" & day of theDate) copy theDate to b set month of b to January set thisMonth to text -2 thru -1 of ("0" & (1 + (theDate - b + 1314864) div 2629728)) try word 2 of (theDate as string) as integer -- will error on US date format set theFirstPart to thisDay & "/" & thisMonth on error set theFirstPart to thisMonth & "/" & thisDay end try set theShortDate to theFirstPart & "/" & (year of theDate) as text return theShortDate end FormatDate
Recommended Posts
This topic is 8045 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now