Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Date to Time

Status
Not open for further replies.

kennedymr2

Programmer
May 23, 2001
594
AU
Using VB2008

I have a string #10:00:00#

Need to add todays date to to above to get a datetime eg

"#10/7/2011 10:00:00#"

Is there a simple way of doing this ???

Appreciate some help

regards Kennedymr2

 
Test it, but should work:
Code:
            Dim DateVal As Date
            DateVal = "10:00:00"
            DateVal = Today & " " & DateVal

--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
 
ousoonerjoe

Thanks very much,worked fine.


Was fiddling around with now() didi not know about 'today'



Regards Kennedymr2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top