Date/Time Problem on Form

  • Thread starter Thread starter Tera News Server
  • Start date Start date
T

Tera News Server

I have a form for checking our equipment. One field "Date Rented"shows
current date and time that the equipment is checked out. I have another
field that shows "Date Due" which I just set as "[Date Rented]+2" or in
other words two days after date checked out. BUT my problem is that I need
the date due to be a specific time. The return time should be 6:00 PM (1800
Hours), the second day after the equipment is checked out.

Can anyone guide me in the right direction?

Thanks,
TD
 
I have a form for checking our equipment. One field "Date Rented"shows
current date and time that the equipment is checked out. I have another
field that shows "Date Due" which I just set as "[Date Rented]+2" or in
other words two days after date checked out. BUT my problem is that I need
the date due to be a specific time. The return time should be 6:00 PM (1800
Hours), the second day after the equipment is checked out.

Can anyone guide me in the right direction?

Thanks,
TD

As Control Source of an Unbound Control:
=Int([CheckOutDate])+2.75

Today's (2/29/2004) value is 38046.
The Int([CheckOutDate]) returns that value, regardless of any time
portion.
1800 hours is 3/4 (0.75) of one day (18/24 = 3/4).
So add 2 days to the date value then set the time value to .75.
The date value is the value before the decimal.
The Time value is the percentage of the day and is the part after the
decimal
38046. + 2.75 = 38048.75
3/2/2004 18:00 hours

Hope this is clear.
 
A very big THANK YOU. This works great.

fredg said:
I have a form for checking our equipment. One field "Date Rented"shows
current date and time that the equipment is checked out. I have another
field that shows "Date Due" which I just set as "[Date Rented]+2" or in
other words two days after date checked out. BUT my problem is that I need
the date due to be a specific time. The return time should be 6:00 PM (1800
Hours), the second day after the equipment is checked out.

Can anyone guide me in the right direction?

Thanks,
TD

As Control Source of an Unbound Control:
=Int([CheckOutDate])+2.75

Today's (2/29/2004) value is 38046.
The Int([CheckOutDate]) returns that value, regardless of any time
portion.
1800 hours is 3/4 (0.75) of one day (18/24 = 3/4).
So add 2 days to the date value then set the time value to .75.
The date value is the value before the decimal.
The Time value is the percentage of the day and is the part after the
decimal
38046. + 2.75 = 38048.75
3/2/2004 18:00 hours

Hope this is clear.
 
Back
Top