Page 1 of 1

Another Date question

Posted: Thu May 04, 2006 12:00 pm
by seanc217
If I have a text string which is a date coming in from a sequential file as such : 1/1/2006 and I want to use the StringtoDate function on it, It appears that I will have to manipulate the date to 0 fill both the 1's so that is appears as such: 01/01/2006.

Is this correct?

Or is there are format for the date as I specified above?

Thanks.

Posted: Thu May 04, 2006 2:16 pm
by seanc217
I was able to solve this one by parsing the date out and adding the place holders as necessary.

If anyone is interested in how I did it let me know I will post the code.

Thanks.

Posted: Thu May 04, 2006 2:34 pm
by ray.wurlod
Couldn't you just have specified %mm/%dd/%yyyy (or %dd/%mm/%yyyy) as the date format in the function?