I have a text column that contains the value ‘05122006’. How can I use this value to set a date column as ‘05/12/2006’?
In the Advanced Programming Guide I see the TextToDate example of:
//returns the DateObject as a date 03/11/1998
DateObject = new Date(03,11,98);
However, I have not been able to use this successfully to do the above.
Yes, based on your above two suggestions the following appears to work:
var mytext = '05122006'
var mymonth = utils.stringLeft(mytext,2);
var myday = utils.stringMiddle(mytext,3,2);
var myyear = utils.stringMiddle(mytext,5,4);
datefield = new Date(myyear,mymonth-1,myday);