Page 1 of 1

date conversion

Posted: Thu Mar 06, 2008 2:07 am
by shaonli
My i/p date is in the format yyyy-mm-dd.I want to convert in the format mmddyyyy.
Please suggest.Both the fields(i/p and o/p) datatype is Date.

Posted: Thu Mar 06, 2008 2:20 am
by ray.wurlod
Dates, as you would have learned had you conducted a search, do not have any format - they are stored in binary format.

Date format strings specify how to convert between dates and string representations thereof.

Posted: Thu Mar 06, 2008 2:21 am
by ArndW
If you are getting a "date" data type then the data is in internal binary form and the field actually has no format at all.

Posted: Thu Mar 06, 2008 3:04 am
by shaonli
So is it not possible to convert in the format I specified if the o/p data type is DATE.Please clarify.

Posted: Thu Mar 06, 2008 3:07 am
by shaonli
So is it not possible to convert in the format I specified if the o/p data type is DATE.Please clarify.

Posted: Thu Mar 06, 2008 3:09 am
by ArndW
A Date datatype has no format. How you display the Date column is dependant upon the display settings of your target system, that is where you need to look.