Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
victor_greffet
Partner - Contributor III
Partner - 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

1 Solution

Accepted Solutions
avkeep01
Partner - Specialist
Partner - Specialist

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

View solution in original post

2 Replies
avkeep01
Partner - Specialist
Partner - Specialist

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
Partner - Contributor III
Partner - Contributor III
Author

thanks, you save my life

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