

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Convert a date into months
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))
));
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be try this
Month(Date#([End Date], 'M/D/YYYY h:mm:ss TT')) as Month1
Also, check these links out

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be try this
Month(Date#([End Date], 'M/D/YYYY h:mm:ss TT')) as Month1
Also, check these links out

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes you are right sunny..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
shall we use date# in place of timestamp# ????
as it is in timestamp format.. just for clarification

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date#() or TimeStamp#() should both work... but TimeStamp#() will be more informative

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
informative means in what way??? then why we need timestamp# when date# can do the same thing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no such difference in both function You can use which ever you want.
See Henric reply on below thread.
Regards,
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

- « Previous Replies
-
- 1
- 2
- Next Replies »