G
Guest
if I have a field that I want to store to a database is there a function that
I can use to show that it is just time without appending a date to it or
something? For example: I want to enter 0430 pm and have it store 1630
(military time) to my database. For example the following always returns
12:00 AM no matter what time I enter. Is there some way to convert it to
just time without it expecting a whole date?
Dim resp As String
resp = InputBox("enter time")
MsgBox CDate(Format(resp, "nn:ss"))
I can use to show that it is just time without appending a date to it or
something? For example: I want to enter 0430 pm and have it store 1630
(military time) to my database. For example the following always returns
12:00 AM no matter what time I enter. Is there some way to convert it to
just time without it expecting a whole date?
Dim resp As String
resp = InputBox("enter time")
MsgBox CDate(Format(resp, "nn:ss"))