Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I change and remove the date format in this order ?
Eg -I have a date as Date - 2/8/2022 10:02:49 PM and I want only this in frontend - 8/2/2022.
I tried [dayname(Date) as Date ] and as a result got 2/8/2022. But I also want to change the format.
hi
try this
date(floor(timestamp#('2/8/2022 10:02:49 PM','DD/MM/YYYY hh:mm:ss TT')),'MM/DD/YYYY')
try this
Date(Floor( Date#(DATE_FIELD)),'MM/DD/YYYY') as DATE
or
Date(Date#(subfield('2/8/2022 10:02:49 PM', ' ' ,1),'MM/DD/YYYY'),'MM/DD/YYYY') as NewDate
test:
load *,
Date(Date#(subfield(mydate, ' ' ,1),'MM/DD/YYYY'),'MM/DD/YYYY') as NewDate ;
LOAD * INLINE [
mydate
2/8/2022 10:02:49 PM
];
date(floor('2/8/2022 10:02:49 PM'),'D/M/YYYY')