View Full Version : add minutes to current time
Trevor
03-17-2008, 10:35 PM
I'm tring to add 30 minutes to the current t ime but have had no luck. i have tried =time()+30
=dateadd("n",30,NOW())
thanks for help
DarkSprout
03-18-2008, 03:18 AM
Try:
'// output hh:mm:ss
Dim tmNewTime As Date
tmNewTime = DateAdd("n", 30, Time())
' OR
'// hh:mm
Dim strNewTime As String
strNewTime = Format(DateAdd("n", 30, Time()), "hh:nn")
Trevor
03-19-2008, 12:23 PM
Darksprout, thanx, the first argument worked,
I was trying to do it all within the control source of the textbox, and it just doesn't want to work that way, I looked at my original post and the Mow()) is a typo it should had been Now())
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.