G Guest Jul 22, 2004 #1 I want to be able to change a DateTime object from 12:00 AM to 12:00 PM and I am struggling in doing so. Any thoughts would be helpful
I want to be able to change a DateTime object from 12:00 AM to 12:00 PM and I am struggling in doing so. Any thoughts would be helpful
J Jay B. Harlow [MVP - Outlook] Jul 22, 2004 #2 bbdobuddy, A DateTime value itself is immutable (un-changeable). You need to create a new DateTime based on the existing DateTime. Something like: Dim aTime As DateTime If aTime.Hour = 0 Then aTime = aTime.AddHours(12) End If bbdobuddy said: I want to be able to change a DateTime object from 12:00 AM to 12:00 PM Click to expand... and I am struggling in doing so. Any thoughts would be helpful
bbdobuddy, A DateTime value itself is immutable (un-changeable). You need to create a new DateTime based on the existing DateTime. Something like: Dim aTime As DateTime If aTime.Hour = 0 Then aTime = aTime.AddHours(12) End If bbdobuddy said: I want to be able to change a DateTime object from 12:00 AM to 12:00 PM Click to expand... and I am struggling in doing so. Any thoughts would be helpful