Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Timestamp Issue

Hi All, I am facing issue in conversion of timestamp and format of the time stamp is '09/21/2015 00:59:30 AM' I m using this expression Timestamp(Timestamp#('09/21/2015 00:59:30 AM','MM/DD/YYYY hh:mm:ss tt'),'MM/DD/YYYY hh:mm:ss') and getting ouput as null. Please help me out. Regards Deepak

4 Replies
PradeepReddy
Specialist II
Specialist II

just try once..

Timestamp(Timestamp#('09/21/2015 12:59:30 AM','MM/DD/YYYY hh:mm:ss tt'),'MM/DD/YYYY hh:mm:ss')

sasiparupudi1
Master III
Master III

Try

=Timestamp(Timestamp#(left('09/21/2015 00:59:30 AM',19),'MM/DD/YYYY hh:mm:ss'),'MM/DD/YYYY hh:mm:ss')

jsingh71
Partner - Specialist
Partner - Specialist

Try this also:

=Replace('09/21/2015 00:59:30 AM',Right('09/21/2015 00:59:30 AM',3),'')

jagan
Luminary Alumni
Luminary Alumni

Hi Deepak,

00:59:30 AM is an invalid time, the valid time 12:59:30 AM.

=Timestamp(Timestamp#('09/21/2015 12:59:30 AM', 'MM/DD/YYYY hh:mm:ss tt'))  -- Valid

The other option is truncate AM/PM in timestamp and convert to DateTime like below

=Timestamp(Timestamp#(left('09/21/2015 00:59:30 AM',19),'MM/DD/YYYY hh:mm:ss'),'MM/DD/YYYY hh:mm:ss')


Hope this helps you.


Regards,

Jagan.