Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I have a string 2015-05-26 12:34:38, how can I find its numeric value ?
I tried
=num(Timestamp
(
Timestamp#(2015-05-26 12:34:38,'YYYY-MM-DD HH:MM:SS')
,'YYYY-MM-DD HH:MM:SS'
)
)
doesnt not work
Try using this in the test box
=num('2015-05-26 12:34:38')
Try this with single quotes around your time when you are using it by typing it out:
=Num(Timestamp#('2015-05-26 12:34:38', 'YYYY-MM-DD HH:MM:SS'))
When using a fieldname you can do this:
=Num(Timestamp#(FieldName, 'YYYY-MM-DD HH:MM:SS'))
Please note that format code 'MM' denotes month, not minutes:
=Num(Timestamp#('2015-05-26 12:34:38', 'YYYY-MM-DD hh:mm:ss'))
Without testing, I think Swarup's expression will also work as long as QV recognizes the string matching it with it's default timestamp format. Stating a explicite format code like above should work anyway.
You are right, my bad Stefan. Correct Expressions should be:
=Num(Timestamp#('2015-05-26 12:34:38', 'YYYY-MM-DD hh:mm:ss'))
=Num(Timestamp#(FieldName, 'YYYY-MM-DD hh:mm:ss'))