Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DIFFERENCE BETWEEN CURRENT DATE/TIME AND SET FIX DATE/TIME

Status
Not open for further replies.

ann1

IS-IT--Management
Jan 23, 2003
11
GB
Hi Guys
Using V9 and SQL. I could do with some help on this one ...
I need to calculate the time in "days/hours/minutes" left between the current date and time (when the report is run) and the set "must fix by" date and time taking into account business hours and holidays.

I have tried Ken H's formula but seem to be getting into a mess with it ... any help would be appreciated.
Thanks

 
Please post your formulas and some sample output to help us visualize what you are currently doing.

~Brian
 
The long term solution is to create a Periods table, which contains whatever dimensions you require, such as date, business day, holiday, weekend, hours.

Now you can do a Left Outer to your data and you have what you need. Other solutions will require that you keep manually coding what is built into every data warehouse for precisely this reason.

I have posted SQL code here to cerate a SQL Server period table in the past, if by SQL you mean MS SQL Server, do a search and you should find it.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top