Time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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.
 

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

Similar Threads

HELP! What's Up With Time 2
Difference between two times 5
Time Calculation 1
Date/Time Formatting 2
Convert Date and Time 9
convert GMT Date & Time 6
Excel Catagorise AM or PM 7
Calculating End-of-Week Date 3

Back
Top