Jump to content
Sign in to follow this  
Polyphony

Date/Time Coercion

Recommended Posts

I'm wondering how to get data into filemaker other than text. Date objects in AppleScript are actually DateTime stamps containg both day and time data. There are easy way to seperate day, time, and the like, but I can't find a way to get that into a filemaker Date or Time Field. If I try to put data like "10/13/80" into a date field, I get an error. Any ideas? No, I don't want to create an extra calculation field, or global field... I just want to put this date into a date field. It's really frustrating.

Share this post


Link to post
Share on other sites

Applescript will treat it as a text data type. You will have to bring it into a filemaker text field and then perform surgery on it with TextToDate() and TextToTime() functions to put it into the proper date and time fields.

Share this post


Link to post
Share on other sites

NOOOoooOOOOooOO!!

Is there any other way? I have problems with AppleScript classes and coercions in general. Is there any way to format data into filemaker compatible classes so that date/time fields accept them as input? My AppleScript is part of one big import, and it would be great if I could avoid the switching between filemaker & applescript. Thanks for your input though.

Share this post


Link to post
Share on other sites

According the info I have, the only format that Filemaker accepts for cell values is type string. Even if you are doing a big import, I don't see why you can't import everything into text fields, and when done, do one mass conversion.

Actually, as I think about this, I wonder what happens if you leave out the slashes and use the integer equivalent of the date. That is, the number of days since Jan. 1, 1904. If that works, you could do the conversion with Applescript. That might be less messy.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    cfmartinez1090 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.