Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
Can anyone tell me the use of NUM() ?
Thanks
Date(Floor(Num(Logdatetime)), 'MM/DD/YYYY')
Num() is redundant here - it is a formatting command, so it does nothing in this case as the Date() format will override the Num() format.
Hi
Try like this
=Date(Floor(Timestamp#('31/03/2015 10:10:50 am','DD/MM/YYYY hh:mm:ss tt')), 'MM/DD/YYYY')
=Date(Floor(Timestamp#(Logdatetime,'DD/MM/YYYY hh:mm:ss tt')), 'MM/DD/YYYY')
if its already dateformat, use Timestamp instead of Timestamp#.
Hope it helps
If it's not really a question about Num(), you may try:
=DayStart(Logdatetime)
Does everything in a single step.
If your input date format doesn't follow the default pattern for timestamps (and as a result QV reads values in the wrong order, or simply doesn't "get it"), then use
=DayStart(Date#(Logdatetime, 'DD/MM/YYYY hh:mm'))
or use a format that better matches the input data.
If the output of DateStart isn't formatted like you want it to be, use
=Date(DayStart(Date#(Logdatetime, 'DD/MM/YYYY hh:mm')), 'YYYY@MM@DD')
or use any other format.
Note that the time(), date() and timestamp() functions all do more or less the same thing. They only differ in their choice of default format if you omit the second parameter.
And as an added bonus:
Date(date, formatpattern) associates a new format string with the numerical value in date. It does not change that numerical value in any way.
Date#(date, formatstring) tries to deduce a date value from the first parameter by matching the format string from the second parameter with the date value. If that works, a numerical value with a date format string will be the result. If it doesn't, you'll get NULL.
Best,
Peter.
Have you tried applying the examples from the manual?
If NO, please try it so that you can see what happens and learn from the output.
When you have tried it, what specifically is it that is unclear?