Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: Date Formatting drive me crazy

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

I don't know why works !! But works !! :-)

3 Replies

Re: Date Formatting drive me crazy

HI

Try like this

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

mallemalle
Contributor III

Re: Date Formatting drive me crazy

you can try date(DeliveryDate) as DeliveryDate1

or left(DeliveryDate,11) as DeliveryDate1

or left(date(DeliveryDate,11) as DeliveryDate1

Not applicable

Re: Date Formatting drive me crazy

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

I don't know why works !! But works !! :-)

Community Browser