Miliary Time


J

Jani

I need to convert text to time which I've worked out using this formula
(found on this website, thanks!):
Expr3: TimeValue(Format([Order_CreateTime],"@@:mad:@:mad:@")) which produces the
time as h:mm:ss AM or PM. What I need is the time to be in military time and
can't figure out that part. Any help is much appreciated. Thank you!
 
Ad

Advertisements

J

John W. Vinson

I need to convert text to time which I've worked out using this formula
(found on this website, thanks!):
Expr3: TimeValue(Format([Order_CreateTime],"@@:mad:@:mad:@")) which produces the
time as h:mm:ss AM or PM. What I need is the time to be in military time and
can't figure out that part. Any help is much appreciated. Thank you!

Don't confuse data STORAGE with data PRESENTATION. They are different. Any
Date/Time value is actually stored internally as a Double Float number, a
count of days and fractions of a day (times) since midnight, December 30,
1899. Your TimeValue() function returns a Date/Time value - e.g. if
OrderCreateTime is 060000 it will contain 0.25 (a quarter of a day, 6 hours).

You can set the Format property of the textbox in which Expr3 is displayed to
hh:nn:ss (if that's what you mean by "military time".

I take it that the order creation DATE is stored separately or is irrelevant?
It's usually simpler in the long run to store the date and time in the same
field (even if that field needs to be displayed twice, once with a date format
and once with a time format), so you can do things like calculate the time lag
between different records. If all of your times are on December 30, 1899 it
can get difficult.
 

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

Top