Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i want to convert 15-01-2014 12:00:00 to 1/15/2014
how ??
Try
=Date(Floor(Date#('15-01-2014 12:00:00','DD-MM-YYYY hh:mm:ss')),'M/D/YYYY')
=date(date#('15-01-2014 12:00:00', 'DD-MM-YYYY hh:mm:ss'),'M/DD/YYYY')
EDIT you can read this for detailed help
=date(date#('15-01-2014 12:12:2014','DD-MM-YYYY hh:mm:ss'))
this will do. if u convert it to number u will see the corresponding time fraction. with this u can change it back to timestamp at any point..
-Sundar
hi
try this
date(date#('15-01-2014 12:00:00','DD-MM-YYYY hh:mm:ss'),'MM/DD/YYYY')
Hi,
supposed your timestamp values are stored in a field 'yourField',then
if yourField is type text:
date(timestamp#(yourField, 'DD-MM-YYYY hh:mm:ss'), 'M/DD/YYYY')
if yourField is type Timestamp:
date(yourField, 'M/DD/YYYY')
Both methods leave the time part of yourField untouched, i.e. whenever you use the result as a dimension, you probably get multiple occurrences of 1/15/2014 (each with a different, unvisible time value).
So if you intend to get numerically identical values per date (i.e. dates not timestamps), you have to strip the time part like:
if yourField is type text:
date(floor(timestamp#(yourField, 'DD-MM-YYYY hh:mm:ss')), 'M/DD/YYYY')
or
date(daystart(timestamp#(yourField, 'DD-MM-YYYY hh:mm:ss')), 'M/DD/YYYY')
or
date(dayname(timestamp#(yourField, 'DD-MM-YYYY hh:mm:ss')), 'M/DD/YYYY')
if yourField is type Timestamp:
date(floor(yourField), 'M/DD/YYYY')
or
date(daystart(yourField), 'M/DD/YYYY')
or
date(dayname(yourField), 'M/DD/YYYY')
hope this helps
regards
Marco