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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

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