Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have date format like this " 23-03-2016 18:20:20". My requirement is to show in hours. How to show in Hour format?
Thanks
Hi,
If you want this in script try like this
LOAD
*,
TimeStamp(TimeStamp#(Left(TimeFieldName, 13), 'DD-MM-YYYY hh')) AS Date_Hour
FROM DataSource;
Regards,
Jagan.
=Hour(ur field)
or else u want with date also
Date(Datefield) & ' - ' & Hour(Datefield)
try this
=Time(Frac(Datefield, 'hh')
Hi,
Try,
=Hour(Date#('23-03-2016 18:20:20','DD-MM-YYYY hh:mm:ss'))
Load *,
Hour(Date#(FieldName,'DD-MM-YYYY hh:mm:ss')) & ' Hours' as Hour
From Source
Hi Jack,
Your requirement is not clear.
If you want to take hours out of your date field then you can use : hour(DateField)
If you want hours between today and your date field then you can use Interval function like:
=Interval(Date(Today(),'DD-MM-YYYY hh:mm:ss') - Date(Date#(DateField,'DD-MM-YYYY hh:mm:ss'),'DD-MM-YYYY hh:mm:ss'),'hh')
Please see : Today with timestamp will return : 31-03-2016 00:00:00
If you want exact time of now, you can use now() instead of Today()
Regards,
Anjali Gupta
Hi,
Try like this
TimeStamp(TimeStamp#(Left('23-03-2016 18:20:20', 13), 'DD-MM-YYYY hh'))
Regards,
Jagan.
Hi,
If you want this in script try like this
LOAD
*,
TimeStamp(TimeStamp#(Left(TimeFieldName, 13), 'DD-MM-YYYY hh')) AS Date_Hour
FROM DataSource;
Regards,
Jagan.