Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
johanlind
Contributor II
Contributor II

left in script

I have a filed (Orderdate) like this:
2011-06-14 11:02:59
2011-06-14 11:03:09
2011-06-14 15:14:43
2011-06-14 11:02:50
2011-06-14 14:44:37
2011-06-14 13:51:33
How do I do for just read out the orderdate?
I have tried to use left i the script
date(left(Orderdate,10)) as OrderDate
It will return:
2011-06-14
2011-06-14
2011-06-14
2011-06-14
2011-06-14
2011-06-14
I just want one post with 2011-06-14 not six posts.
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Johan,

Did you try?

Date(Floor(OrderDate)) AS OrderDate

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

   Try this way.

    Load

   Date(OrderDate) as OrderDate

   From XYZ

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
johanlind
Contributor II
Contributor II
Author

I've tried it also but the result is the same.

nagaiank
Specialist III
Specialist III

You may try

Load Distinct SubField(OrderDate,' ',1) as OrderDate1, ...

From ...

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   From where are you getting this data...?

   Try this too.

    Date(Date#(OrderDate,'YYYY-MM-DD hh:mm:ss'),'DD/MM/YYYY') as OrderDate

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Miguel_Angel_Baeyens

Hello Johan,

Did you try?

Date(Floor(OrderDate)) AS OrderDate

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

johanlind
Contributor II
Contributor II
Author

Thanks Miguel

Now it works fine.