Jump to content
Sign in to follow this  
nightdesigns

Text to Date

Recommended Posts

I have a text field made from parsed text that has a date in it in mm/dd/yyyy format. I'm having a heck of a time getting that into a date formatted field. I've tried set field which results in a "?" and i've tried a calculation field that ='s that text field as a result in date. Same result.

In short

Text field of "01/01/2000"

set field into date field results in "?"

Text field of "01/01/2000"

in a calculation field with a rest of date results in "?"

Any ideas?

Share this post


Link to post
Share on other sites

The problem is entering text into a date field. Even though the text is in the correct date format, it is not the correct data type. This can be tested by the IsValid( ) function. Use the TextToDate( date ) function in your calcualtion field and/or your script.

a) Set Field ["DateField", "TextToDate( TextFieldWithDate )"]

: cDateField = TextToDate( TextFieldWithDate )

c) Another option is using the Date( month , day , year ) function in the parsing field.

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  

×
×
  • Create New...

Important Information

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