Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
umashankarus
Contributor III
Contributor III

Date Conversion Issues

Hi Experts,

I am getting incorrect, null and some times correct date conversion for various data rows

Correct:

Date(Floor(Timestamp#('1/23/2018 12:01:30 PM', 'MM/DD/YYYY HH:MM:SS TT')),'MM/DD/YYYY')

Result = 01/23/2018

Incorrect

Date(Floor(Timestamp#('1/23/2018 2:06:00 PM', 'MM/DD/YYYY HH:MM:SS TT')),'MM/DD/YYYY')

Result = 06/23/2018

Null

Date(Floor(Timestamp#('1/22/2018 3:52:00 PM', 'MM/DD/YYYY HH:MM:SS TT')),'MM/DD/YYYY')

Result = -

Can you pl point to the issue here ?

Thanks for the help

1 Solution

Accepted Solutions
rubenmarin

Hi, try setting the time mask in lower case:

=Date(Floor(Timestamp#('1/23/2018 2:06:00 PM', 'MM/DD/YYYY hh:mm:ss tt')),'MM/DD/YYYY')

View solution in original post

2 Replies
rubenmarin

Hi, try setting the time mask in lower case:

=Date(Floor(Timestamp#('1/23/2018 2:06:00 PM', 'MM/DD/YYYY hh:mm:ss tt')),'MM/DD/YYYY')

umashankarus
Contributor III
Contributor III
Author

That works

Thanks for the help