Hi,
my input is 26-feb-2010,i am reading as varchar in the source
Now i want to populate into date column.
i was used below function
StringToDate(Trim(lk_read.expiry_date),"%yyyy-%mmm-%dd").
after executing the job i am getting output as astroids(*********)
Can anyone pleaase help me to sort out the issue.
Thanks in advance.
How can I convert a string into a date?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
Your date format is incorrect, it should read "%dd-%mmm%-%yyyy"
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
I just noticed a typographical error on my part, the format should be
"%dd-%mmm-%yyyy"
"%dd-%mmm-%yyyy"
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
there was space issue with the date,so trim the data and then applied the type conversion function.Now its working finepavankatra wrote:thank you for your replyArndW wrote:Your date format is incorrect, it should read "%dd-%mmm%-%yyyy" ...
i was tried ,but its not working.
Thanks for your support.