Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Time Stamp

Hi,

Could someone kindly assist me with a time stamp conversion problem I have. I have a field (Received Date) which has a time stamp, and an example is : 13.3.2014  13:28:16 . I would like to convert this to a date and have been trying the following:

Date(Floor(TimeStamp#([Received Date],'DD.MM.YYYY hh:mm:ss')),'DD.MM.YYYY') as [Received Date],

For some strange reason it is not converting the time stamp and is returning values of "-" in the Received Date field.

Help please .

Thank you Herbiec 09

7 Replies
PrashantSangle

Hi,


Try this


Date(Floor(TimeStamp(TimeStamp#([Received Date],'DD.MM.YYYY hh:mm:ss'),'DD.MM.YYYY hh:mm:ss')),'DD.MM.YYYY') as [Received Date],


Or

you can do


Date(Floor([Received Date]),'DD.MM.YYYY') as [Received Date],


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
amit_saini
Master III
Master III

Hi Herbert,

Please check if this is working for you: (Goto Numbers--->Select your Field ---->>>Select Time stamp option

Thanks,

AS

CELAMBARASAN
Partner - Champion
Partner - Champion

13.3.2014  13:28:16 looks like it will display the 01.01.2014 01:01:01 as 1.1.2014 1:1:1 if it is the case then your expression would be

Date(Floor(TimeStamp#([Received Date],'D.M.YYYY h:m:s')),'DD.MM.YYYY') as [Received Date]

MK_QSL
MVP
MVP

=Date(FLOOR(Timestamp#([Received Date],'DD.M.YYYY  hh:mm:ss')),'DD.MM.YYYY')

er_mohit
Master II
Master II

Try this in text object

=Date(Date#('13.03.2014 13:28:16','DD.MM.YYYY hh:mm:ss'),'DD.MM.YYYY')

so in script try this

Date(Date#([Received Date],'DD.MM.YYYY hh:mm:ss'),'DD.MM.YYYY') as [Received Date]

or  try this way

If(len([Received Date])>0,Date(Date#([Received Date],'DD.MM.YYYY hh:mm:ss'),'DD.MM.YYYY') )as [Received Date]

Not applicable
Author

Hi,

Try this

=Date(Date#([Received Date],'DD.MM.YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss')

Regards

Kumar

Not applicable
Author

Hi,

Got it working with:

Date(Date#(Left([Received Date],Index([Received Date],' ')-1),'D.M.YYYY'))

Hope this helps