Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello
i have date format as the below screenshot and i try to convert it to dd-mm-yyyy , but it show no date when i use the following expression :
Date(Date#(TRANSACTION_DATE, 'YYYY-MM-DD hh:mm:ss'), 'DD/MM/YYYY') AS Master_Calendar_Date_Num
thanks
It seems to be already interpreted as date and therefore the following should be enough:
Date(TRANSACTION_DATE, 'DD/MM/YYYY')
Hi,
Your TRANSACTION_DATE contains milliseconds, so I would use :
Date(Date#(TRANSACTION_DATE, 'YYYY-MM-DD hh:mm:ss.ms'), 'DD/MM/YYYY') AS Master_Calendar_Date_Num
Regards
What you have is a timestamp. You can format it to look like a date but the underlying number is going to be a timestamp so it won't function like a dimension. What I would do first is remove the time portion using floor().
So something like Date(Floor(TRANSACTION_DATE), 'DD/MM/YYYY') AS Master_Calendar_Date_Num
@dosaril It is already a date, there is no need to use Date#. Use Date(floor(TRANSACTION_DATE), 'DD/MM/YYYY')