Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Users,
I'm importing one of the .csv file into QlikView. The data source contains one column in format " 3/21/2016 12:00:00 AM" but I want only month from the mentioned date. I'm using month() function to fetch only months and that I am using every time but it didn't work. Could any one please tell me what may be reason that month function is not working.
below is the script I'm using -
LOAD //WorkCenter_Operation_Desc_Op_No_Key & '-' & SHOP_ORDER & '-' & Num([End Date]) AS CompositeKey,
//WorkCenter_Operation_Desc_Op_No_Key,
//SHOP_ORDER,
Month([End Date]) as Month1,
[LT(hrs)]
FROM
//[$(vExcel_Folder)\ChartData.csv]
(txt, utf8, embedded labels, delimiter is ',', msq, filters(
Remove(Row, Pos(Top, 2))
));
May be try this
Month(Date#([End Date], 'M/D/YYYY h:mm:ss TT')) as Month1
Also, check these links out
May be try this
Month(Date#([End Date], 'M/D/YYYY h:mm:ss TT')) as Month1
Also, check these links out
date([End Date],'MM') as month
try this. if it don't work
try this one
date(timestamp#([End Date],'DD/MM/YYYY hh:mm:ss TT'),'MM')
Don't recommend doing that, because this will only display as a date, but will have an underlying date value. So in a list box, this might show 5 31 times if there is a date for each of the days in the month of May.
Yes you are right sunny..
shall we use date# in place of timestamp# ????
as it is in timestamp format.. just for clarification
Date#() or TimeStamp#() should both work... but TimeStamp#() will be more informative
informative means in what way??? then why we need timestamp# when date# can do the same thing
There is no such difference in both function You can use which ever you want.
See Henric reply on below thread.
Regards,
When a new developer or non-developer (with limited knowledge of QlikView) see TimeStamp vs Date... he will have an easier time understanding TimeStamp as a timestamp and date as a date... so for somebody who doesn't know, it might make sense to use TimeStamp#().
then why we need timestamp# when date# can do the same thing
I don't know, do you want to go ahead and send an email to Qlik asking them why they made Date#() and TimeStamp#() interchangeably usable?