Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
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
Partner - Champion III
Partner - Champion III

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.