• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Coerce a string to a date??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Coerce a string to a date?? (From: Michael Tompsett <email@hidden>)

  • Prev by Date: Re: BUG: Where's Application Support?
  • Next by Date: Re: Breaking the 32k limit [Was: Insufficient memory for Folder Actions Extension; how can Iincrease allocation?]
  • Previous by thread: Coerce a string to a date??
  • Next by thread: Re: Coerce a string to a date??
  • Index(es):
    • Date
    • Thread