John,
In addition to the other comments, here are some useful Date/Time methods
from an earlier post of mine.
' define the variables
Dim theDate As DateTime = #3/9/2004#
Dim theTime As DateTime = #8:03:05 AM#
Dim theDateTime As DateTime = #9/6/2004 1:05:03 PM#
' theDate = theDate + theTime
Dim tsTime As TimeSpan = theTime.TimeOfDay
theDate = theDate.Add(tsTime)
' tsDiff = theDate - theDateTime
Dim tsDiff As TimeSpan = theDate.Subtract(theDateTime)
' Print the total seconds
Debug.WriteLine(tsDiff.TotalSeconds, "seconds")
' theDateTime = theDate + theTime
theDateTime = theDate.Add(theTime.TimeOfDay)
FWIW, in case any one was wondering, in my earlier post I had used:
Dim tsTime As TimeSpan = theTime.Subtract(DateTime.MinValue)
This can be shortened to TimeOfDay.
Dim tsTime As TimeSpan = theTime.TimeOfDay
Hope this helps
Jay
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi
How can I separate a datetime value into date & time values? Conversely
how can I combine date & time values into a single datetime value?
Thanks
Regards