Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
1adam_haj
Contributor III
Contributor III

Date time format issue

Hello, i have field that contains date and time information.

This is the data added as raw dimension in to the table [Date_start]

raw.png

This is the same field when I apply the Timestamp() Fucintion => Timestamp(Date_Start)

timestamp.png

But when i try apply the timestamp fuction with requried format this happens:

Timestamp(Date_Start,'DD/MM/YYY HH:MM:SS')

timestamp wrong.png

As you can see, the time somehow changes from 8:49:44 to 8:05:44. Can someone explain to me what is happening and how can i prevent it ? 

The required outcome is from the last function Timestamp(Date_Start,'DD/MM/YYY HH:MM:SS')  => 13/05/2019 08:49:44

 

Thanks in advance

Labels (4)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try Timestamp(Date_Start,'DD/MM/YYYY hh:mm:ss')
MM = Month
mm = minutes

View solution in original post

4 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Adam,

How this exactly is working.. I don't know. But you need to know there are, with date functions, two functions available. 

  1. Function(x)
  2. Function#(x)

The function with the '#' interprets the field first while the other can transform the field. This is often not a problem, but when you don't define the field with '#' you have the possibility that Qlik isn't interpreting it right.

So, try to use Timestamp#() first and around this function, place the Timestamp.

Jordy

Climber

Work smarter, not harder
tresesco
MVP
MVP

Format codes 'MM' (month) and 'mm' (minute) are not same. Try like:

 

Timestamp(Date_Start,'DD/MM/YYY HH:mm:SS')

Vegar
MVP
MVP

Try Timestamp(Date_Start,'DD/MM/YYYY hh:mm:ss')
MM = Month
mm = minutes

1adam_haj
Contributor III
Contributor III
Author

Yep, that was the problem. Thank you very much, I have never noticed this difference in syntax 😄