Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

SET a Time to a Timestamp

Hi,

Do you know how to set a time, in the timestamp.

Ex: If a process entry date is: 26/03/2012 01h56.

A working day starts at 8h00, so I want to store the value 26/03/2012 08h00.

if(hour(entry_date) < 8, ??Set(entry_date, 8h00)??, entry_date) as entry_working_date

Do you know a simple way to do it?

Regards,

Gonçalo

1 Solution

Accepted Solutions
Luminary
Luminary

SET a Time to a Timestamp

There is a maketime() function so you could do something like

timestamp(floor(entry_date) + maketime(8))

The floor function is used to get rid of the time part of entry_date and then you add 8 hours to the entry_date.  The timestamp() format function is needed to change the number to a timestamp format again.

Karl

2 Replies
Luminary
Luminary

SET a Time to a Timestamp

There is a maketime() function so you could do something like

timestamp(floor(entry_date) + maketime(8))

The floor function is used to get rid of the time part of entry_date and then you add 8 hours to the entry_date.  The timestamp() format function is needed to change the number to a timestamp format again.

Karl

Not applicable

SET a Time to a Timestamp

Tks Karl!