Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am used to having tables which contain a date field that I can convert to month or year by using YearStart(Date) or MonthStart(Date). I now have a month field (1-12) and a Year Field (YYYY). I would like to add a rolling month fields that combines the month and year. Here is what I have given a shot with no luck.
Date(Month Feild & '/' & Year Field ,'MM/YY') as RollingMonth. ;
This script runs with no errors but does not produce the fields that I intended.
Any Help would be appreciated.
Thanks,
Jeff
you can use makedate( YearField, MonthField)
I guess that if you want to use date, it`s going to be
Date#(Month Feild & '/' & Year Field ,'MM/YY')
or
Date(Month Feild & '/' & Year Field ,'MM/YYYY')
Hope it helps,
Erich
Hi.
Try the following:
date(monthstart([Date]),'MMM YY') as RollingMonth.
Regards.
Hi Sandro,
Thanks for the quick response. My issue is that I do not have a full date feilds (mm/dd/yy) I only have a month field and a Year field. Can a make a rolling month by combining and using the date function?
Thanks Again,
Jeff
You may also use the internal function MONTHNAME(YourDate).
Peter
you can use makedate( YearField, MonthField)
I guess that if you want to use date, it`s going to be
Date#(Month Feild & '/' & Year Field ,'MM/YY')
or
Date(Month Feild & '/' & Year Field ,'MM/YYYY')
Hope it helps,
Erich
Another option could be:
date(monthstart(date('01.'&[Month Feild]&'.'&[Year Field])),'MMM YY') as RollingMonth
Regards.