Focal Point
Strip time stamp from a Date Field

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8611038331

February 07, 2005, 04:22 PM
Chuck Mason
Strip time stamp from a Date Field
Help!

I have a Date field (HYYMDs) that I want to split the date and the time stamp. I have found the function to do this for the Date component...is there a comparable WF function to display just the timestamp?

START_DT STRT_DT STRT_TM
2005/01/28 06:36:24.000 2005/01/08 06:36:24.000

Thanks!
Chuck
February 07, 2005, 05:44 PM
<Grzegorz>
Chuck,

If you just want to display the time part of the datetime field you can use the following example:

TABLE FILE MYS_DTABL
PRINT STAMP
COMPUTE TIME_PART/A10 = EDIT(HCNVRT(STAMP, '(HYYMDS)', 20, 'A20'), '$$$$$$$$$$9999999999');
END

The master file for the MYS_DTABL:
FILE=MYS_DTABL, SUFFIX=SQLMYSQL,$
SEGNAME=MYS_DTABL,
SEGTYPE=S0 ,$
FIELD=STAMP, stamp, HYYMDS, HYYMDS, MISSING=OFF,$

Hope this helps
Grzegorz
February 07, 2005, 06:42 PM
George Brown
In the upper right corner of this page there should be a link to the Technical Documentation Library where I found the listing for HTIME... this function should do what you need.

The heading was

"HTIME: Converting the Time Portion of a Date-Time Value to a Number "