Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
kartik
Contributor III
Contributor III

Date Format

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. 

Labels (1)
3 Replies
brunobertels
Master
Master

hi 

try this 

date(floor(timestamp#('2/8/2022 10:02:49 PM','DD/MM/YYYY hh:mm:ss TT')),'MM/DD/YYYY')

 

 

Chanty4u
MVP
MVP

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
];

 

Chanty4u_0-1646735811377.png

 

anat
Master
Master

date(floor('2/8/2022 10:02:49 PM'),'D/M/YYYY')