Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Formatting drive me crazy

Hi Folks,

another doubt.

I have the TableA

Order     Position     DeliveryDate

99          10              01/01/2012 00:00:00

I want create another table ( TableB ) with

Order     Position     DeliveryDate

99          10              01/01/2012 (date type)

My code for download the TableA from the system is:

TableA:

SQL Order,

Position,

DeliveryDate FROM Table_from_the_system

My code , wrong, for the table is:

TableB:

Load Order,

Position,

date(date#(DeliveryDate,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY') as New_DeliveryDate Resident TableA;

But doesn't work !!

I tried every function...

date(DeliveryDate,'DD/MM/YYYY hh:mm:ss') as New_Deliverydate,

left(DeliveryDate,10) as New_Deliverydate,

text(DeliveryDate) as New_Deliverydate,

date#(left(DeliveryDate,10),'DD/MM/YYYY') as New_Deliverydate,

date(timestamp(DeliveryDate,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY') as New_Deliverydate,

But ever the result is the character -

1 Solution

Accepted Solutions
Not applicable
Author

I resolved with timestamp(DeliveryDate,'DD/MM/YYYY') as New_Deliverydate,

I don't know why works !! But works !! 🙂

View solution in original post

3 Replies
MayilVahanan

HI

Try like this

date(timestamp#(DeliveryDate,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
MEllinghausen
Creator III
Creator III

you can try date(DeliveryDate) as DeliveryDate1

or left(DeliveryDate,11) as DeliveryDate1

or left(date(DeliveryDate,11) as DeliveryDate1

Not applicable
Author

I resolved with timestamp(DeliveryDate,'DD/MM/YYYY') as New_Deliverydate,

I don't know why works !! But works !! 🙂