converting string to date
660195May 5 2009 — edited Apr 30 2010Hi,
I have to read data from a flat file and insert it into database tables.
In the flat files I have some fileds which have date in them. And the formats are "21-NOV-2008 03:49:44" and "21-DEC-08 03:49:44". I need to insert them into a date field in a database table which accepts date in "DD-MON-YY"(Ex 21-NOV-08) format only.
When I created xsd for the flat file, I treated the fields that contain date as string type.
Kindly tell me, how do I convert this string into data of format "DD-MON-YY".
I tried using format-dateTime function with the following parameters:
dateTime : xpath xpression for the field in the flat file.
picture: "DD-MON-YY".
This is inserting nothing into the database. I am not sure if the usage is correct.
Kindly suggest.
Thanks,
RV