Re: Date object into FMP field
Re: Date object into FMP field
- Subject: Re: Date object into FMP field
- From: "Gary (Lists)" <email@hidden>
- Date: Thu, 11 Mar 2004 14:25:25 -0500
Simon Forster wrote [3/11/04 6:26 AM]:
>
I'm working on a project where I have an AppleScript date object which
>
I want to write to a FileMaker Pro date field.
FM won't handle the date object, as you found. You need to get just the
actual _day date_ values (meaning, ditch the time stuff).
You have to coerce the date to text, get the portion you want (using any of
several AS methods to get out the date string stuff).
FM date formatted fields still get text entered. They become 'dates' for FM
purposes, based on the field formatting options and your local time/date
settings.
>
Just trying to set the
>
field to the date object fails. I can get the date as a string in the
>
dd/mm/yyyy format that my (UK) version of FileMaker will accept.
>
However, as soon as someone in the US uses this script, it'll fail (or
>
give unexpected results).
>
>
So, what's the preferred way of getting a date into a FileMaker Pro
>
date field?
Andy O. gave you some stuff that is _way_ too complicated. Just get the
Day, Month, Year from your AS date, make it text, plop that into the FM date
field.
You don't need any calculation fields or LeftWords() and all this. [But, of
course, that doesn't make Andy's method wrong...it's just the reverse of my
suggestion. He takes the whole AS date blob, makes that a string, with all
the "Wednesday" and time stuff, then uses FM instead of AS to break it
down.]
Either way. I think doing the work in AS is much faster, and you don't need
extra fields in your FM file.
--
Gary
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.