Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
Creator
Creator

how to convert time stamp format to actual date format

Hi All

i have the following field : format is MM/DD/YYYY h:m:sec

Order_Date

01/05/2001 12:00:00

02/12/2002 11:12:35

12/25/2009 10:12:35

how can we convert to

Order_Date

01/05/2001

02/12/2002

12/25/2009

8 Replies
Anonymous
Not applicable

=date(floor(date#('01/05/2001 12:00:00','DD/MM/YYYY hh:mm:ss')),'DD/MM/YYYY')

use Order_Date instead of fixed date

MK_QSL
MVP
MVP

Use below in your script...

Date(Floor(TimeStamp#(YourTimeStampFieldName,'DD/MM/YYYY hh:mm:ss')),'DD/MM/YYYY') as Date

Anonymous
Not applicable

There are several ways to do that, here are some:

  • You can simply use "date" function: "date(Order_Date)".
  • If you guarantee that your field has always a date format like "MM/DD/YYYY", you can use "left(Order_Date, 10)" or "mid(Order_Date,1,10).

But, use the first way, is more guaranteed.

madhubabum
Creator
Creator
Author

Hi Manish kachhia

Thanks to your reply

But itz not working

sunny_talwar

Try this:

Date(Floor(TimeStamp#(YourTimeStampFieldName,'MM/DD/YYYY hh:mm:ss')),'MM/DD/YYYY') as Date

madhubabum
Creator
Creator
Author

Hi Manish Kachhia

Thanks to your reply

instead of Timestamp# ,..........i am using Timestamp ...then it's working fine.

Thanks

Madhu

MarcoWedel

if Timestamp works, then your field is already recognized as real/dual timestamp, i.e.

DayName(yourtimestampfield)

might also work.

hope this helps

regards

Marco

MarcoWedel

date(Order_Date)


formats a numerical value, so the result might look like dates but still includes the fractional (time) part in the underlying numerical value.


regards


Marco