convert timstampz to date

hi in excel file i have field whoz dat type is ‘TimeStampz’ and the field value is somethin like this ‘2002-09-27 23:32:17+08’…i need to put this in navision …i need to pull the date out… thanx

MyDateStr := COPYSTR(TimeStamp, 9, 2) + COPYSTR(TimeStamp, 6, 2) + COPYSTR(TimeStamp, 1, 4); EVALUATE(MyDate, MyDateStr);

Be careful with this, I think that the TimeStamp field displays based on your machines local/regional settings. What you write in code for one machine, may not work on the next. To check, change your setting to M-d-Y and see if the display of the TimeStamp in Excel is the same! It;s a good time to do it now, as oppoed to 05-05-05 …

Hi SV thanks for the answer.It works fine. Hi John thanks to u for alerting me. yep it does give errors if the date format is worng, but i think we can come over either ny changing the system time for the period of data migration or else can use date functions. thanks again