Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm confused about how/when to use this function. Any tips?
You can use like
Date(Date#(Month,'YYYY-MM'),'MM') should give you Month number
You can use Date() any time you need to manipulate a date field format
Date(sale_timestamp,'YYYY-MM') would give you 2013-10
If you have a specific question or example you need help with please post it and I would be happy to help if I can
Thank you. So, another option would be Date(sale_timestamp,'MM') to get just the month- is that right?
Yes, you can also use Month(sales_timestamp)
Date: When you are getting your date data as number then sipmly you can use data function to format.
Date#: When you are getting your date data as string /expression then this function Evaluets the expression and give date based on format provided
This is my issue:
Monthly_Exchange_Rates:
Load
Currency,
Date#(Month, 'YYYY-MM') as [Year-Month],
Mid(Month, 6, 2) as MonthNum, /*This worked, but is there another way? Month(Month) just gives a "-" */
Rate
Inline [
Currency, Month, Rate
EUR, 2013-05, 1
EUR, 2013-07, 1
EUR, 2013-06, 1
EUR, 2013-09, 1
EUR, 2013-08, 1
I have this:
Date#(Month, 'MM') as MonthNo2
Where the Month field is 'YYYY-MM' format. I want ONLY the month part. But it's not happening.
You can use like
Date(Date#(Month,'YYYY-MM'),'MM') should give you Month number
I appreciate that. Thanks.