Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

victor_greffet
New Contributor III

extract date only

Hi community,

I'm facing trouble with date type,

I load date from an excel database., I have that kind of data :

Date
20/07/2017  08:41:33
20/07/2017
20/07/2017  08:41:33
18/08/2017
25/07/2017
20/07/2017  10:41:35
....

In the script I tried :

  • date(Date) as FinalDate
  • date#(Date,'<DD/MM/YYYY>') as FinalDate

But it seems that the time is still here...

I want to extract only date DD/MM/YYYY :

I want :

Date
20/07/2017
20/07/2017
20/07/2017
18/08/2017
25/07/2017
20/07/2017

Do you have an idea ?

Thanks,

Victor

Tags (1)
1 Solution

Accepted Solutions
avkeep01
Valued Contributor

Re: extract date only

Hi Victor,

assuming that all dates have the same format:

DATE(DAYSTART(Date),'DD/MM/YYYY') AS FinalDate


or


DATE(FLOOR(Date),'DD/MM/YYYY') AS FinalDate

or (a lesser solution)

DATE(LEFT(Date,10),'DD/MM/YYYY') as FinalDate

2 Replies
avkeep01
Valued Contributor

Re: extract date only

Hi Victor,

assuming that all dates have the same format:

DATE(DAYSTART(Date),'DD/MM/YYYY') AS FinalDate


or


DATE(FLOOR(Date),'DD/MM/YYYY') AS FinalDate

or (a lesser solution)

DATE(LEFT(Date,10),'DD/MM/YYYY') as FinalDate

victor_greffet
New Contributor III

Re: extract date only

thanks, you save my life

I use the DATE(FLOOR(Date),'DD/MM/YYYY') AS FinalDate...