Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
1adam_haj
New 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

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Date time format issue

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

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

4 Replies
Highlighted
Partner
Partner

Re: Date time format issue

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
Highlighted
MVP
MVP

Re: Date time format issue

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

 

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

Highlighted
Partner
Partner

Re: Date time format issue

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

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted
1adam_haj
New Contributor III

Re: Date time format issue

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