Can I create a variable and use a Function of some sorts to return the number of hours between two given dates ? If so, what function do I use ?
I did see a daysbetween, but I need to pass time also. I am developing using FullClient. Thanks.
As of v5 there is no straight forward way to get the no of hours between two dates, unless you store the timestamp also in the database and create a complex substring function in BO to compute the number of hours.
I’ve got an extension dll which I wrote which provides two functions.
datediff(date1, date2) - return the difference between two dates in days, it includes a fractional part to give you the difference in hours/mins etc. Appologies to Sybase/MS Sql users for the use of the function name I’m afraid it isn’t as flexible as the real thing
formatastime(seconds) - returns a character string H:M:S of the number of seconds converted to hours:mins:seconds. It doesn’t accumulate to days, but will report it as 48 hours for two days.
If anybody wants it just drop me an e-mail. Copy the dll to you userlibs directory and restart BO. The formatastime funciton is fairly extensivley tested, the datediff function less so, as we harly ever use it. If there is a lot of interest I’ll see if Dave can get it put on the Integra web site, or maybe there is even somewhere on BOB.
[quote:7285652cb5=“ken.gaul”]If anybody wants it just drop me an e-mail. Copy the dll to you userlibs directory and restart BO. The formatastime funciton is fairly extensivley tested, the datediff function less so, as we harly ever use it. If there is a lot of interest I’ll see if Dave can get it put on the Integra web site, or maybe there is even somewhere on BOB.
So to get what you want datediff(date1, date2)*24
[/quote]
Ken:
Please email your dll to bobdownloads@forumtopics.com and we’ll get it set up for folks to download here on BOB. Thanks. 8)