Hi All,
I used below code to populate in one of my target field as below format.
CCCC-MM-DD HH:MM:SS.
code is:
TimestampToString(StringToTimestamp(from_funnel.EFCTE_CLCLD_DTTM, "%yyyy%mm%dd %hh:%nn"), "%yyyy-%mm-%dd %hh:%nn:%ss")
but now my requirement is to poulate only 'CCCC-MM-DD' format,but not needed time.
where can i modify my code in my previous code.
Help should be appreciated.
Date format
Moderators: chulett, rschirm, roy
Date format
Thanx&Regards
scorpion
scorpion
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Re: Date format
Code you specified also is finally making a string, so if you just want to modify, you can use substring function
or else rewrite the code with conversions related to date instead of timestamp.
Code: Select all
TimestampToString(StringToTimestamp(from_funnel.EFCTE_CLCLD_DTTM, "%yyyy%mm%dd %hh:%nn"), "%yyyy-%mm-%dd %hh:%nn:%ss")[1,10]
or else rewrite the code with conversions related to date instead of timestamp.
scorpion wrote: TimestampToString(StringToTimestamp(from_funnel.EFCTE_CLCLD_DTTM, "%yyyy%mm%dd %hh:%nn"), "%yyyy-%mm-%dd %hh:%nn:%ss")
but now my requirement is to poulate only 'CCCC-MM-DD' format,but not needed time.
where can i modify my code in my previous code.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>