Tomorrow 9:00:00 AM in a Date

evertVB

Registered User.
Local time
Yesterday, 16:37
Joined
Sep 21, 2010
Messages
21
How can I get Tomorrow 9:00:00 AM in a Date type?

Following code will return exactly current time tomorrow:
Code:
  Dim hDate As Date
  hDate = DateAdd("d", 1, Now())

But I want tomorrow 9:00:00 AM in hDate.
 
Maybe I've got it:

Code:
Function Tomorrow_9() As Date
  Dim hDate As Date
  Dim h9 As Date
  h9 = #9:00:00 AM#
  hDate = DateAdd("d", 1, Now())
  hDate = CDate(Format(hDate, "dd/mm/yy"))
  Tomorrow_9 = DateAdd("h", 9, hDate)
End Function
 
Here is a simpler expression:

= Date() + 1.375
 

Users who are viewing this thread

Back
Top Bottom