Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

Calculate via dates

I have an application where the users time is login in and out. I am using the NOW function to retrieve the time. Is there a way to subtract the log out time from the log in time with out getting fancy?

dim login as date
dim logout as date
dim answer as date

answer = login - logout
0
jmoneilthe2
Asked:
jmoneilthe2
  • 2
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
answer = datediff("x", login, logout)

where x is a character indicating a type of value (seconds, hours, days, years, etc)
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now