Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've to make Year, Month, Week, Day out of this date (date_added) field.
How to split this field and get my master calendar?
Hi,
Try this,
Date(Date#(date_added,'MM/DD/YYYY hh:mm'),'DD/MM/YYYY') as New_Date_Field,
Year(Date#(date_added,'MM/DD/YYYY hh:mm')) as Year,
Month(Date#(date_added,'MM/DD/YYYY hh:mm')) as Month,
Day(Date#(date_added,'MM/DD/YYYY hh:mm')) as Month
and so on..
Update: I did a small correction in my solution. Sorry for the confusion. ![]()
Hi Murali,
Could you post your script here? It would be helpful for us to provide you the better solution.
Hi,
I've a date field with time on it. I just need date like 'DD/MM/YYYY' format.
Currently I've a format of ex: 10/15/2016 14:19 ('MM/DD/YYYY hh:mm')
I need a proper date filed to convert later as Month, Year, Day and so on... Please see my date field example shown above.
"https://www.tutorialspoint.com/qlikview/qlikview_master_calendar.htm
this link will explain how to create a master calendar
Hi Murali
Date: date(date#(date_added, 'MM/DD/YYYY HH:SS'), 'DD/MM/YYYY')
Year: year(date_added)
Month: date(date#(date_added, 'MM/DD/YYYY HH:SS'), 'MMM')
Week: week(date(date#(date_added, 'MM/DD/YYYY HH:SS'), 'DD-MM-YYYY')
Day: date(date#(date_added, 'MM/DD/YYYY HH:SS'), 'DD')
Regards
Hemanth
Hi,
Try this,
Date(Date#(date_added,'MM/DD/YYYY hh:mm'),'DD/MM/YYYY') as New_Date_Field,
Year(Date#(date_added,'MM/DD/YYYY hh:mm')) as Year,
Month(Date#(date_added,'MM/DD/YYYY hh:mm')) as Month,
Day(Date#(date_added,'MM/DD/YYYY hh:mm')) as Month
and so on..
Update: I did a small correction in my solution. Sorry for the confusion. ![]()
Hi,
To get the date and change format you can use "floor" and "date" function
E.g.:
Load *,
Year (date) as Year,
Month (date) as Month,
Week (date) as Week,
Day(date) as Day;
Load
.........
date_added,
date(floor(date_added),'DD/MM/YYYY') as date,
........
From.....;