|
Here's a routine that works in production: $ymd and $hms are data structures that just split up the dates and times into CCYYMMDD and HHMMSS. // convert the start and end dates/times to timestamps // then calculate the elapsed time in minutes. monitor; reset dsDateTime; $ymd = %Editc(dsEmp(idx).empStartDate(idx2):'X'); $hms = %editc(dsEmp(idx).empStartTime(idx2):'X'); startTimeStamp = %timeStamp(($year + '-' + $month + '-' + $day + '-' + $hour + '.' + $minute + '.' + $second + '.000000')); reset dsDateTime; $ymd = %editc(dsEmp(idx).empEndDate(idx2):'X'); $hms = %editc(dsEmp(idx).empEndTime(idx2):'X'); endTimeStamp = %timeStamp(($year + '-' + $month + '-' + $day + '-' + $hour + '.' + $minute + '.' + $second + '.000000')); dsEmp(idx).empMinutes(idx2) = %diff(endTimeStamp:startTimeStamp:*minutes); Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.