Convert to date format

Hi,

I am using pre-populated data set and using a date that I want to calculate with current date i.e.today().

The pre-populated data set is in .csv format and date is in 'YYYY-MM-DD'. When I read from the pre-populated and display on the screen, I can see the correct display of the value, e.g. '2011-11-25'. I assume the date values are in text format which we need to convert to 'date' format.

I have used the command date(${field1}) to convert to date format and when the output it shows a blank field.

Can anyone suggest how to convert to date from a text.

Many thanks,

Surajit

Please: only one post of a question, to either opendatakit@ or to
opendatakit-developers@.

This question is more appropriate for opendatakit@

··· On Wed, May 25, 2016 at 7:59 AM, wrote:

Hi,

I am using pre-populated data set and using a date that I want to
calculate with current date i.e.today().

The pre-populated data set is in .csv format and date is in 'YYYY-MM-DD'.
When I read from the pre-populated and display on the screen, I can see the
correct display of the value, e.g. '2011-11-25'. I assume the date values
are in text format which we need to convert to 'date' format.

I have used the command date(${field1}) to convert to date format and when
the output it shows a blank field.

Can anyone suggest how to convert to date from a text.

Many thanks,

Surajit

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks Mitch for the response. I was also thinking where I had posted, so posted second time, did not realize about the group.

Surajit

··· On Wednesday, May 25, 2016 at 12:40:58 PM UTC-4, sbba...@gmail.com wrote: > Hi, > > I am using pre-populated data set and using a date that I want to calculate with current date i.e.today(). > > The pre-populated data set is in .csv format and date is in 'YYYY-MM-DD'. When I read from the pre-populated and display on the screen, I can see the correct display of the value, e.g. '2011-11-25'. I assume the date values are in text format which we need to convert to 'date' format. > > I have used the command date(${field1}) to convert to date format and when the output it shows a blank field. > > Can anyone suggest how to convert to date from a text. > > Many thanks, > > Surajit