Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Re: Convert Time Stamp

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,

Regards,
Prashant Sangle
amit_saini
Honored Contributor III

Re: Convert Time Stamp

Hi Herbert,

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

Thanks,

AS

Re: Convert Time Stamp

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]

Re: Convert Time Stamp

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

er_mohit
Honored Contributor II

Re: Convert Time Stamp

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

Re: Convert Time Stamp

Hi,

Try this

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

Regards

Kumar

Not applicable

Re: Convert Time Stamp

Hi,

Got it working with:

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

Hope this helps

Community Browser