Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all!
I have a question regarding dates. I have an excel with a date column ' 2010-04-01' and I would like to use the year and month from this field so I would like to have '2010-04'. I thought this would be the solution but it doesn't work:
date(date#(left(Date, 7), 'YYYY-MM'), 'YYYY-MM') as %CurrencyPeriod
This results in a '-'
Any suggestions of how I could do this?
Br
Cristian
Hi,
I think you have to use this expression :
Year(Date)&'-'&Month(Date) as [%CurrencyPeriod]
Thank you but this results in: '2010-apr'. How can I convert the month to a number?
Br
Cristian
Year(Date)&'-'&num(Month(Date)) as [%CurrencyPeriod]
Great! Thank you!
Br
Cristian