Avatar of pdvsa
pdvsa
Flag for United States of America asked on

Start Time

Experts, I have a query.  How can I set a field to say 10am?  ie Start Time: (this field needs to be 10am)

thank you
Microsoft Access

Avatar of undefined
Last Comment
pdvsa

8/22/2022 - Mon
Dale Fye

If you set the field to a date/time data type, you can use the value:

.416666667

This represents 10/24 ths of a day.  If you look at the data in the field, without setting the format to one of the Time formats, it will likely display:

12/30/1899 10:00 AM

Because the integer portion (in this case zero) represents days from 12/30/1899
pdvsa

ASKER
Dale:  I am in design mode in a query.  The field is not from a table and I assume you are referring to the field properties in the table.  Not sure if I follow correctly though.

please see pic:  thyis might explain it better

pic in query design
Dale Fye

StartTime: 10/24

StartTime: .416666667

Then right click on the column header for that column (narrow bar between the grid and the horizontal scroll bar associated with the top part of the query design window) and set the Format property of that column to Short/Medium/Long time
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Rey Obrero (Capricorn1)

try this

StartTime: TimeSerial(10,0,0)
ASKER CERTIFIED SOLUTION
Rey Obrero (Capricorn1)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PatHartman

Or
#10:00#
Rey Obrero (Capricorn1)

the query will still force it to display #10:00:00 AM#  if you use #10:00#
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Dale Fye

I guess I was making it harder than it needed to be, must have been a late afternoon brain fart!
pdvsa

ASKER
That was it.  thank you!