Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

juanjulian_hs
New Contributor II

Transform data into date format

Hello everyone,

Quick question. I am trying to convert the current dates into a format that can be interpreted by qlik sense. I have tried every possible function to make it work: Date(RESPONSE_DATE,'MMMMYY'), Date#(RESPONSE_DATE, 'MMMMYY'), Date(Date#(RESPONSE_DATE, 'MMMMYY'),'MMMMYY'), Floor(RESPONSE_DATE), Year(RESPONSE_DATE), Month(RESPONSE_DATE) but none of them work and when applied they return a dash.

Is anyone capable of transforming it?

Thank you

1 Solution

Accepted Solutions
bwisealiahmad
Valued Contributor

Re: Transform data into date format

Hi,

First interpret it and then you can wrap it with a Date function to show it how you want it shown.

  1. Date#(RESPONSE_DATE,'DD.MM.YY') - Intepret with Date#() Function.
  2. Date(Date#(RESPONSE_DATE,'DD.MM.YY'),'DD.MM.YYYY') - Change formatting with the Date() Function.

So what you end up with is:

    Date(Date#(RESPONSE_DATE,'DD.MM.YY'),'DD.MM.YYYY') AS RESPONSE_DATE

And this is what it will look like afterwards:

Capture.PNG

Best,

Ali A

4 Replies
juanjulian_hs
New Contributor II

Re: Transform data into date format

I intend to then link this data to my link table and the dates to match the ones in my master calendar.

bwisealiahmad
Valued Contributor

Re: Transform data into date format

Hi,

First interpret it and then you can wrap it with a Date function to show it how you want it shown.

  1. Date#(RESPONSE_DATE,'DD.MM.YY') - Intepret with Date#() Function.
  2. Date(Date#(RESPONSE_DATE,'DD.MM.YY'),'DD.MM.YYYY') - Change formatting with the Date() Function.

So what you end up with is:

    Date(Date#(RESPONSE_DATE,'DD.MM.YY'),'DD.MM.YYYY') AS RESPONSE_DATE

And this is what it will look like afterwards:

Capture.PNG

Best,

Ali A

juanjulian_hs
New Contributor II

Re: Transform data into date format

Thank you Ali,

Although I was interpreting it, I was trying to give it the format I wanted to end up in directly. Hence it wasn't working. I will remember it now for future times!!

bwisealiahmad
Valued Contributor

Re: Transform data into date format

Notice this part:

Date(Date#(RESPONSE_DATE, 'MMMMYY'),'MMMMYY')


That should have been DD.MM.YY


You are basically telling Qlik what date format the source is in, which is DD.MM.YY and not MMMMYY and then when it knows that you can of course change that to whatever you want like maybe MMMMYY.


Cheers,


Ali