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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference Between (2) Date/Time Fields...?

Status
Not open for further replies.

smedvid

MIS
May 28, 1999
1,228
US
I am hoping that Access can support what I am attempting without much coding. I need to create a simple table that records server scheduled/unscheduled outages. For simplicty let's say 3 fields: ServerName, StartOut, & EndOut, where StartOut & EndOut are Date/Time format. I need to develop a calculation that will show the difference in those date/time fields in hours. Any help is appreciated. Thanks. Steve
Steve Medvid
Atlas Commerce ("ebusiness evolved")
 
try this create a new field in a query put Downtime: Nz([EndOut])-Nz([StartOut]) then format that field into a Short Time so the format would look like this 1:00 only. For example if your server went out at 1:00 AM to 1:30 AM the Downtime field would display 0:30 meaning 30 mins. You might want to include the a date and time stamp for endout and startout because there are problems when the downtime runs through midnight unless the date is included. Try it and let me know if it works.
 
I would recommend using the DateDiff() function. You can get syntax and usage under help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top