Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlickers
Im a trying to convert '6/13/2022 12:00:00 AM' to 'YYYY/MM/DD' but I cant seem to get it to work.
My script:
Date(Date#(Floor(AcuStock_Date),'D/M/YYYY hh:mm:ss TT'),'YYYY/MM/DD') as MyDate2
Please advise
That formula isn't right...
Perhaps:
Date(Floor(Date#(AcuStock_Date,'M/D/YYYY hh:mm:ss TT')),'YYYY/MM/DD')
Your Date# format needs to match the string's format, which it doesn't appear to. You then need to Floor() that result (which will get rid of the timestamp aspect), and then the Date function on that will tag the field as date and set the format.
You can't floor a string, so that's likely your problem. Try moving the Floor outside the Date#.
Date(Floor(Date#(AcuStock_Date),'DD/MM/YYYY hh:mm:ss TT'),'YYYY/MM/DD') as MyDate2
no success
That formula isn't right...
Perhaps:
Date(Floor(Date#(AcuStock_Date,'M/D/YYYY hh:mm:ss TT')),'YYYY/MM/DD')
Your Date# format needs to match the string's format, which it doesn't appear to. You then need to Floor() that result (which will get rid of the timestamp aspect), and then the Date function on that will tag the field as date and set the format.