Answered by:
Add minutes to starttime in msaccess vba code

Question
-
Hello,
I have a starttime and would like to add minutes to get an endtime.
examaple starttime : 2016-09-05 08:00:00.000 + 75 = 2016-09-05 09:15:00.000 (=endtime)
Thanks in advance.
Regards,
Ralph.
- Edited by RalphPoetiray Monday, August 29, 2016 7:12 AM
Monday, August 29, 2016 7:09 AM
Answers
-
the "DateAdd()" function should do the trick.
See here for samples:
https://www.techonthenet.com/access/functions/date/dateadd.php
you would want to use:
endtime = DateAdd("n",75,starttime)
- Edited by Chuck u Norris Monday, August 29, 2016 8:14 AM fix example
- Proposed as answer by Tom van Stiphout (MVP)MVP Monday, August 29, 2016 10:14 PM
- Marked as answer by Deepak Saradkumar PanchalMicrosoft contingent staff Tuesday, September 6, 2016 2:56 AM
Monday, August 29, 2016 8:12 AM -
Hi RalphPoetiray,
Here in the link below you can find another examples of that.
Add to or subtract from date and time values
if you have any further questions you can ask.
Regards
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Deepak Saradkumar PanchalMicrosoft contingent staff Tuesday, September 6, 2016 2:56 AM
- Marked as answer by Deepak Saradkumar PanchalMicrosoft contingent staff Tuesday, September 6, 2016 2:56 AM
Tuesday, August 30, 2016 3:24 AM
All replies
-
the "DateAdd()" function should do the trick.
See here for samples:
https://www.techonthenet.com/access/functions/date/dateadd.php
you would want to use:
endtime = DateAdd("n",75,starttime)
- Edited by Chuck u Norris Monday, August 29, 2016 8:14 AM fix example
- Proposed as answer by Tom van Stiphout (MVP)MVP Monday, August 29, 2016 10:14 PM
- Marked as answer by Deepak Saradkumar PanchalMicrosoft contingent staff Tuesday, September 6, 2016 2:56 AM
Monday, August 29, 2016 8:12 AM -
Hi RalphPoetiray,
Here in the link below you can find another examples of that.
Add to or subtract from date and time values
if you have any further questions you can ask.
Regards
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Deepak Saradkumar PanchalMicrosoft contingent staff Tuesday, September 6, 2016 2:56 AM
- Marked as answer by Deepak Saradkumar PanchalMicrosoft contingent staff Tuesday, September 6, 2016 2:56 AM
Tuesday, August 30, 2016 3:24 AM