newbie question about time

  • Thread starter Thread starter Guest
  • Start date Start date
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"))
 
Dawn,

In the database is (mostly) the date written in ticks from a certain start
dates which can be in milliseconds or nanoseconds.

However to translate those dates to the dates you want in dotnet you can use
the "To" methods in datetime. Where the overloaded ToString is probably the
most used.

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top