Convert 'YYYY-MM-DD hh:nn:ss' format to 'YYYY-MON-DD' in PX
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 12
- Joined: Mon Nov 27, 2006 1:28 am
Convert 'YYYY-MM-DD hh:nn:ss' format to 'YYYY-MON-DD' in PX
Hi All,
Could anyone plese help me how to convert 'YYYY-MM-DD hh:nn:ss'(Timestamp) format to 'YYYY-MON-DD' in PX by using any pre-defined function?
Thanks in Advance.
Regards,
Prasanta
Could anyone plese help me how to convert 'YYYY-MM-DD hh:nn:ss'(Timestamp) format to 'YYYY-MON-DD' in PX by using any pre-defined function?
Thanks in Advance.
Regards,
Prasanta
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 12
- Joined: Mon Nov 27, 2006 1:28 am
-
- Participant
- Posts: 12
- Joined: Mon Nov 27, 2006 1:28 am
No, there is no single function call which will do this, which is why Maveric proposed his solution. You can get the month number then do a single to get the month string.
Code: Select all
FIELD('JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC',',',{month number})
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
The below code converts the given timestamp into string containing date in the format 'YYYY-MON-DD'.
e.g Timestamp '2007-07-07 00:33:28' will be converted to '2007-jul-07'
Is this what you want?
Code: Select all
DateToString(TimestampToDate(inLink.Col),'%yyyy-%mmm-%dd')
Is this what you want?
I don't know if that is what the poster wanted, but I didn't realize that PX would supply the 3 digit month acronyms {I wonder if PX handles locales as well...}
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 12
- Joined: Mon Nov 27, 2006 1:28 am