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

Hello My name is Jim and I am new to Qlikview

Hello Everyone,

     My name is Jim.

     Right now i have to use Qlikview at my work to build KPIs and i got lots of questions.

     for my date column, it filled with date, month, year and time. how do i separate all of them into different columns in qlikview??

Turn:

1/31/2004 12:00:00 AM

Into 4 different columns

Please help and thank you!

16 Replies
Not applicable
Author

Hi, sorry i think i missed an comma some where in my code. Thank you very much!

Not applicable
Author

Hi Celambarasan,

     What if i want to keep the date month and year together but separate the time??? how do i put that in my code??

FinalizedOrders:

SQL SELECT          DeliveryDate

                              CubedWeight,

                        DeliveryProvince,

                                 OrderNo,

                        PickupPostalCode,

                        Pieces,

                        Weight

FROM CourierComplete.dbo.FinalizedOrders;

CELAMBARASAN
Partner - Champion
Partner - Champion

Use Date(DeliveryDate,'MM/DD/YYYY') AS DateField

     Time(DeliveryDate,'hh:mm:ss') AS TimeField

Not applicable
Author

Thank you Celambarasan

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Use Date(DeliveryDate,'MM/DD/YYYY') AS DateField

     Time(DeliveryDate,'hh:mm:ss') AS TimeField

There is a subtle error here. Date and Time are formatting functions. They will only change the display format and not group data together as you would expect. The correct way to get Date and Time from a Timestamp is with floor() and Frac(). :

Use Date(floor(DeliveryDate),'MM/DD/YYYY') AS DateField

     Time(Frac(DeliveryDate),'hh:mm:ss') AS TimeField

See http://community.qlik.com/docs/DOC-3102 for more on Dates and Times.

-Rob

Not applicable
Author

Thank you so much for your FYI, i was actually looking into that problem earlier with my co-worker

Not applicable
Author

and our solution was to separate them into day, month, year and then group them together using the drill down group.