Re: Coerce a string to a date??
Re: Coerce a string to a date??
- Subject: Re: Coerce a string to a date??
- From: AppleScript Guru <email@hidden>
- Date: Wed, 19 Jun 2002 13:07:15 -0400
Michael,
on 6/19/02 12:42 PM, you said:
>
I am trying to write a script whereby a quark page is opened if its
>
modification date is more recent than a date from a field in filemaker pro.
>
>
I have no problems getting hold of the modification date of the quark file
>
but I seem unable to coerce the data from filemaker into a date.
>
>
I have tried various date formats in the filemaker field e.g 6/6/02
>
06/06/2002 Wednesday, June 19, 2002 1:50:42 PM. When I get the data out of
>
filemaker, i can get it out as a string or list but it will not coerce to a
>
date format.
---> This should do it for you -
-- NOTE: You should be able to use any of the below...
set cDate to "January 9, 2002"
set cDate to "Jan 9, 2002"
set cDate to "1.9.2002"
set cDate to "01.09.2002"
set cDate to "Wednesday, January 9, 2002 12:00:00 PM"
set cDate to "1/9/2002"
set cDate to "01/09/2002"
return (date cDate)
Good luck,
-Ben
Benjamin S. Waldie
Write Track Media
(AppleScript GuRu)
AppleScript Web Site:
http://www.AppleScriptGuru.com
http://www.wtmedia.com
_______________________________________________
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.