I want to convert Alteryx "datetime" format to MS-Excel "number" format
Example:
Alteryx: " 2019-07-21 12:30:00 "
MS-Excel: " 43667.52 "
Kindly help me out in getting the result.
Solved! Go to Solution.
Hi @amogha_cj
This should work:
First the difference in days from Jan,01,1900 (that's how we get the Excel Number)
Then, the time difference in seconds so you can get the decimals.
DateTimeDiff([Field1],"1900-01-01 00:00:00", "days") +
(DateTimeDiff([Field1],DateTimeTrim([Field1],"day"),"seconds")/(60*60*24)) + 2
Cheers,