Discussion Board for collaboration on QlikView Scripting.
Hoe can I script to receive a month and a year out of a field containing a date? I tried the following which did not work:
SQL SELECT jobnr,
Month (datum)& Year (datum) as StundenMonat,
marnr as MitarbeiterStunden
I would like to have: 01 2014, 02 2014 e.g.
Thank you for your help!
Go to Solution.
Date(MonthStart(datum),'MM YYYY') as StundenMonat;
because this will create a real date instead of text, i.e. no sorting and calculation issues ...
I wonder why it did not work. But Try this instead.
Month(Date(datum))& ' ' & Year(Date(datum)) as StundenMonat
This may or may not work, but worth giving a shot.
maybe Month (datum)&' '& Year (datum) as StundenMonat
You can use month and year function to take out the respective part from Date.
For Ex: if you want to pull number of the month you can try
numsum(month(DateField)) & Year (DateField)
Check whether datum is in date format . If yes then try onth (datum)&' '& Year (datum)
you're mixing QV script with SQL.
Month (datum)& Year (datum) as StundenMonat;
Good catch. Did not see that.
True Thank you!