Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I have a master calender with a field [YearMonth]
In an other table I have the fields [Year] and [Periode]
I am trying to link the table to the calender by combining the [Year] and [Periode] field as [YearMonth]
This works but both fields [YearMonth] have a different format and so the data does not match.
The [YearMonth] form the master calender is generated this way:
date(monthstart(Date), 'YYYY-MM') AS YearMonth,
And from the other table this way:
(Year&'-'&Periode) as YearMonth,
Both generate the same information only the [YearMonth] from the calander is alinged to the left and from the other one is alinged to the right.
The question is: How do I get (Year&'-'&Periode) into a (date() 'YYYY-MM'))-format?
Hi, with the date you only are formating the value, but internally still have the day (in this case the 1st of each month), so try this
date(makedate(Year,Periode),'YYYY-MM') as YearMonth
Periode must be a value between 1 - 12
Hope this helps
Rgds
Hi, with the date you only are formating the value, but internally still have the day (in this case the 1st of each month), so try this
date(makedate(Year,Periode),'YYYY-MM') as YearMonth
Periode must be a value between 1 - 12
Hope this helps
Rgds
Yes Perfect! Just what I need.
Thanks