Time

T

ty

I have a date-time field from which I need to separate the date and the time
into two fields. I need at least the time by itself. For example, the field
I have now is "3/8/07 5:59 PM" and I need to only have the time "5:59 PM"
How do I do this?
 
V

Vladimír Cvajniga

1) For Your DateControl set Format, eg. m/d/yy. It may depend on your locals
settings.
2) For "5:59 PM" create a new DateTime control and set it's Format according
to your needs.

Format can be set either via Field properties (database level) or by
Form/Report control's Format property. See Access help.

Vlado

I'd recommendIf you want to do
 
K

KARL DEWEY

According to how you will use it. You can format as Vladimír Cvajniga said
or truely separate the date from the time.

[YourDateField] - Int([YourDateField]) will result in a decimal
fraction that is the part of a day and can then be formated also.
 
Top