Timestamp Formatting

UDA
Enthusiast

Timestamp Formatting

Can I format the timestamp as 20th Feb or Feb 20th? I know the format to get Feb 20 is 'MMMBDD'.But how do i get the 'th'?
1 REPLY
Enthusiast

Re: Timestamp Formatting

Hi adash,

I think we cannot format with a single command as ‘28th FEB’ from TimeStamp column.

But you can use EXTRACT function to get Month and Date, try using the below query:

SELECT EXTRACT(DAY FROM TIMESTAMP_COLUMN_NM) || ’th ‘ || EXTRACT(MONTH FROM TIMESTAMP_COLUMN_NM) FROM TABLE_NM

Regards,
Balamurugan