|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Help!! I need to develop a report that takes 2 date fields (SQLSRVR Date-Time stamp) and computes the difference between them in minutes. I can't seem to find a date function that utilizes the time portion of the date-time stamp. This will be utilized to determine how many hours someone works on a given day derived from timeclock data.
Any help would be greatly appreciated!! Thanks! Chuck |
||
|
|
Master |
I believe the function you are looking for is
HDIFF HDIFF: Finding the Number of Units Between Two Date-Time Values HDIFF(value1, value2, 'component', outfield) where: value1: Is the end date-time value, the name of a date-time field that contains the value, or an expression that returns the value. value2: Is the start date-time value, the name of a date-time field that contains the value, or an expression that returns the value. component: Is the name of the component to be used in the calculation enclosed in single quotation marks. If the component is a week, the WEEKFIRST parameter setting is used in the calculation. outfield: Alphanumeric, Is the field that contains the result, or the format of the output value enclosed in single quotation marks. The format must be floating-point double-precision. In WebFOCUS, you must specify the format. In Maintain, you must specify the name of the field. |
|||
|
|
Member |
Thanks for the post TS!
That's the function I was looking at too, but couldn't find any documentation on the "component" piece of the syntax. I've seen examples of 'Day', 'Month', 'Year' used to compute the differences in those respective time slices....but no example of a difference between dates in say....'minutes'? Would the component be 'minute' or perhaps 'seconds'? Thanks! Chuck |
|||
|
|
Member |
Thanks Pietro!! Works like a charm!
Your soooo right about the date documentation! |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

