The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
date to str problem
Hello all,
I have a problem with "date_str()", and I can not find more detailed description and example about it.
In the help:
Date to String (date_str(date1, DATE_FORMAT_CONSTANT, DATE_SHOW_CONSTANT)): Changes a date to a string using the specified format; example: date_str(A, DATE_FULL, DATE_SHOW_DATE_AND_TIME)
My Question is:
1. Where can I find the values of DATE_FORMAT_CONSTANT and DATE_SHOW_CONSTANT?
2. If I want turn "Jul 08, 2012" to "2012-07-08", how can I set the right parameter?
Thanks very much for the concentration!
I have a problem with "date_str()", and I can not find more detailed description and example about it.
In the help:
Date to String (date_str(date1, DATE_FORMAT_CONSTANT, DATE_SHOW_CONSTANT)): Changes a date to a string using the specified format; example: date_str(A, DATE_FULL, DATE_SHOW_DATE_AND_TIME)
My Question is:
1. Where can I find the values of DATE_FORMAT_CONSTANT and DATE_SHOW_CONSTANT?
2. If I want turn "Jul 08, 2012" to "2012-07-08", how can I set the right parameter?
Thanks very much for the concentration!
0
Answers
date_str is to convert a date into a string. You want to do it vice verse. Thus date For the formatting i recommend http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html . I always get confused by M and m. attached is an example process.
Cheers,
Martin
Dortmund, Germany