Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
1083216:18:28 AM
How do I change the above format to DD/MM/YYYY ?
If we can assume that this is a timestamp on the format
hh:mm:ss TT then we can use that in order to present it as a date in tree steps.
dayname(timestamp#( subfield('1083216:18:28 AM',' '), 'hh:mm:ss'))
1: subfield('1083216:18:28 AM',' ') picks out the timestamp excluding the AM/PM info. This part fill return '1083216:18:28'
2: timestamp#([...], 'hh:mm:ss') inerprets the string value as a timestamp in the 'hh:mm:ss' format (or in your case its more like 'hhhhhhh:mm:ss'. The output of this is now intepreted as a timestamp, but presented as it is written '1083216:18:28'
3: dayname([...]) converts the timestamp into a date value and presents it as a date according to your application's default pattern. This step returns a date, having DD/MM/YYYY as default formating returns 27/07/2023
3 (Alternative method) Date(Floor([...]), 'DD/MM/YYYY')
What are you expecting to see with that timestamp?
Do you know from which source you are fetching it?
If we can assume that this is a timestamp on the format
hh:mm:ss TT then we can use that in order to present it as a date in tree steps.
dayname(timestamp#( subfield('1083216:18:28 AM',' '), 'hh:mm:ss'))
1: subfield('1083216:18:28 AM',' ') picks out the timestamp excluding the AM/PM info. This part fill return '1083216:18:28'
2: timestamp#([...], 'hh:mm:ss') inerprets the string value as a timestamp in the 'hh:mm:ss' format (or in your case its more like 'hhhhhhh:mm:ss'. The output of this is now intepreted as a timestamp, but presented as it is written '1083216:18:28'
3: dayname([...]) converts the timestamp into a date value and presents it as a date according to your application's default pattern. This step returns a date, having DD/MM/YYYY as default formating returns 27/07/2023
3 (Alternative method) Date(Floor([...]), 'DD/MM/YYYY')
Thank you it worked for me !