Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to seperate date and time into 2 diff. fields form DateTimeStamp value.
EG:
8/31/15 1:00 AM |
into
8/31/15 |
1:00 AM
Pls find attached applciation
Try this:
LOAD *,
Date(Floor(TimeStamp)) as Date,
Time(Frac(TimeStamp)) as Time;
LOAD TimeStamp#(Test, 'M/D/YY h:mm TT') as TimeStamp,
Test;
LOAD * Inline
[
Test
8/30/15 8:50 PM
8/30/15 11:40 PM
8/31/15 12:15 AM
...
];
Try this:
LOAD *,
Date(Floor(TimeStamp)) as Date,
Time(Frac(TimeStamp)) as Time;
LOAD TimeStamp#(Test, 'M/D/YY h:mm TT') as TimeStamp,
Test;
LOAD * Inline
[
Test
8/30/15 8:50 PM
8/30/15 11:40 PM
8/31/15 12:15 AM
...
];
Or this:
SET TimeFormat='h:mm TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YY h:mm TT';
LOAD *,
Date(Floor(Test)) as Date,
Time(Frac(Test)) as Time;
LOAD * Inline
[
Test
8/30/15 8:50 PM
8/30/15 11:40 PM
8/31/15 12:15 AM
...
];
Thanks a lot Sunny
Not a problem Mark. I would suggest going through this link to understand why QlikView is unable to understand dates sometime. Why don’t my dates work? and Get the Dates Right. Once you will have this concept cleared out, you will never have any issues with dates.
Perfect brother!
This would help me to understand more!!!