Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Happy New Year!
I have to convert the following date format to standard HH/MM/SS .
My issue is i am unfamiliar with the meaning and how to write the date conversion for the .000000 part of the date format below
2021-08-30 13:00:13.000000
I would use like below:
Date(Date#(admin_added,'YYYY-MM-DD HH:MM:SS'),'DD/MM/YYYY') AS [Date Added],
but get no return due to me not adding the end of the received format .000000
PLease can anyone assist?
Thank you
can you try like:
date(floor(admin_added),'DD/MM/YYYY') as [Date Added]
You could interpret the additional digits as fraction of second with 'f'. Try like:
Date(Date#(admin_added,'YYYY-MM-DD HH:mm:SS.ffffff'),'DD/MM/YYYY') AS [Date Added],
can you try like:
date(floor(admin_added),'DD/MM/YYYY') as [Date Added]
The formula you need is the one from Anat's reply.
Using Floor() function you are effectively removing decimal part for your DateTime value.
For example, for this value --->>>> 44568.010393519
the integer for this number converted to date will be 1/7/2022
the decimal part for the same number converted to time will be 12:14:58 AM
the whole number will be shown as 1/7/2022 12:14:58 AM
thank you, this is perfect.
Daniel