Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a Date field ENTRY_DATE coming from database in the format of 1,110,105 i.e CYYMMDD
i.e 1-C, 11-YY (2011), 01-MM(Jan), 05-DD
I want to show them as YYYY-MM-DD
Using Date(Right(ENTRY_DATE,6)) i could achieve 110105..but the Dates are not correct.
Any suggestions?
Thanks in advance
I got it.
Timestamp(Date(Date#(Right(ENTRY_DATE,6),'YYMMDD'),'YYYY-MM-DD hh:mm:ss AM')) as ENTRY_TIMESTAMP
Closing the thread.
Thanks.
Hi
Use Date(Date#(Right(ENTRY_DATE,6),'YYMMDD'),'YYYY-MM-DD')
Regards
Date(Date#(Right(ENTRY_DATE,5),'YYMMDD'),'YYYY-MM-DD') as ENTRY_DATE
Thanks for the quick reply.
Any idea about Timestamp format with always TT as AM? Like below
Timestamp(Timestamp#(Right(ENTRY_DATE,5),'YYMMDD'),'YYYY-MM-DD hh:mm:ss TT') as ENTRY_DATE?
??
Hi,
When you use
this expression
Timestamp(Timestamp#(Right(ENTRY_DATE,5),'YYMMDD'),'YYYY-MM-DD hh:mm:ss TT')
But your Right(ENTRY_DATE,5) giving only YYMMDD formated date then
Timestamp() consider other parameter like "hh:mm:ss " as "00:00:00"
and according to 00 hour, 00 min and 00 sec your TT as 'AM'.
Regards,
=TimeStamp(TimeStamp#(Date(Date#(Right(ENTRY_DATE,6),'YYMMDD')) & ' 00:00:00'),'YYYY-MM-DD hh:mm:ss TT')
Hi Dude try this
Date(Date#(Right(date,7),'YYM,MDD'),'YY-MM-DD') as date1 Resident table;
and please close the thread
This is another Timestamp field. where i want them as AM always no matter when you run the script.
Not sure why the Timestamp format is showing as A9 instead of AM for TT.. ![]()
Rest are fine though..
Thanks.
hi Gtripathy i think what u have selected as correct answer is not giving the exact answer what ur expecting , please try my example and compare the results
I got it.
Timestamp(Date(Date#(Right(ENTRY_DATE,6),'YYMMDD'),'YYYY-MM-DD hh:mm:ss AM')) as ENTRY_TIMESTAMP
Closing the thread.
Thanks.