Time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text field that I actually type the time into ex. 4:45am
I then have an unboud box that I want to place this in =IIf([First and Last
Name]="Lewis Watson",([Time Leave]-1),Null)
I want the -1 to be off the hour so 3:45am. How can I get it to do that?

Thanks
Chey

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...-a973-21c07444c565&dg=microsoft.public.access
 
Instead of [Time Leave] - 1 use the DateAdd function.

=IIf([First and Last Name]="Lewis Watson", DateAdd("h",-1,[Time
Leave]),Null)

HTH,
Barry
 
If you want it to go back an hour and a half, you could use
DateAdd("h",-1.5,[Time Leave]).

Be careful with "m". It represents months. Minutes are represented with
"n".

HTH,
Barry
 
=IIf([First and Last Name]="Lewis Watson",DateAdd("h",-1.5,[Time Leave]),Null)
this is what I put in and it still gives me the same time as 1 hour.
 
Back
Top