Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, I'm having some real issues with dates and no matter what I try I can't seem to get to the bottom of it.
I'd like to be able to turn the following date/time field from SQL into a nice looking DD/MM/YYYY date field. Can someone please help with the script logic as I'm pulling my hair out (what's left of it anyway).
The current date field looks like this:
Not sure if it's a text field or something etc but I can't get it to format and function as a date.
Any help is much appreciated.
Dayname(RpDt1) should work, assuming it's a date in the first place. You could also use Date(Floor(RpDt1)).
If it's text, you'll need to use something along the lines of Date#(RpDt1,'YYYY-MM-DD').
At this point, you just need to wrap the result in a date() function and optionally provide the formatting, date(Whatever,'DD/MM/YYYY')
Dayname(RpDt1) should work, assuming it's a date in the first place. You could also use Date(Floor(RpDt1)).
If it's text, you'll need to use something along the lines of Date#(RpDt1,'YYYY-MM-DD').
This feels like it's made it closer, this is what I've got now:
Date(Floor(RpDt2),'DD/MM/YYYY')
Try this
Date(Floor(RpDt1),'DD/MM/YYYY') as YourDateField
or
Date(Floor(TimeStamp#(Left(RpDt1,19),'YYYY-MM-DD hh:mm:ss'))) as YourDateField
At this point, you just need to wrap the result in a date() function and optionally provide the formatting, date(Whatever,'DD/MM/YYYY')