Dates and times

T

The Bhoy

I would like to calculate the hours and minutes between 2 dates and times i.e.
Friday 2nd January 2009 10:00 and Saturday 3rd January 2009 18:34.

I know the answer will be 32:34, but I need to put that into a formula for
access.

Also, (sorry) how do I write an expression for the input mask for the field
to show the date and time i.e. 02/01/09 10:00?

Kind regards
Brian
 
W

Wayne-I-M

I would like to calculate the hours and minutes between 2 dates and times
i.e.
Friday 2nd January 2009 10:00 and Saturday 3rd January 2009 18:34.

I know the answer will be 32:34, but I need to put that into a formula for
access.

Try this
http://office.microsoft.com/en-us/access/HA011102181033.aspx?pid=CL100570041033

Also, (sorry) how do I write an expression for the input mask for the field
to show the date and time i.e. 02/01/09 10:00?

FullTime: Format([TableName]![TimeField],"dd/mm/yy hh:nn am/pm")
 
T

The Bhoy

Hi Wayne

Thanks for your answer, I'm grateful.

On the second part you replied to: FullTime:
Format([TableName]![TimeField],"dd/mm/yy hh:nn am/pm") Can this be adapted to
be input in the 24 hour format, i.e. 18:40 instead of 6:30PM?

Kind regards
Brian

Wayne-I-M said:
I would like to calculate the hours and minutes between 2 dates and times i.e.
Friday 2nd January 2009 10:00 and Saturday 3rd January 2009 18:34.

I know the answer will be 32:34, but I need to put that into a formula for
access.

Try this
http://office.microsoft.com/en-us/access/HA011102181033.aspx?pid=CL100570041033

Also, (sorry) how do I write an expression for the input mask for the field
to show the date and time i.e. 02/01/09 10:00?

FullTime: Format([TableName]![TimeField],"dd/mm/yy hh:nn am/pm")
 
W

Wayne-I-M

I think you may be confused about what you input and what is really in the DB

You can set the Input mask (to short time) to give you 18:30
And you can set the field format to this as well
But this is not what is stored
You store the full time date value in any time date field - even if you
can't see it.

Just play around with the format property of the field until you are happy
with the result and then set the input mask to the same.

--
Wayne
Trentino, Italia.



The Bhoy said:
Hi Wayne

Thanks for your answer, I'm grateful.

On the second part you replied to: FullTime:
Format([TableName]![TimeField],"dd/mm/yy hh:nn am/pm") Can this be adapted to
be input in the 24 hour format, i.e. 18:40 instead of 6:30PM?

Kind regards
Brian

Wayne-I-M said:
I would like to calculate the hours and minutes between 2 dates and times i.e.
Friday 2nd January 2009 10:00 and Saturday 3rd January 2009 18:34.

I know the answer will be 32:34, but I need to put that into a formula for
access.

Try this
http://office.microsoft.com/en-us/access/HA011102181033.aspx?pid=CL100570041033

Also, (sorry) how do I write an expression for the input mask for the field
to show the date and time i.e. 02/01/09 10:00?

FullTime: Format([TableName]![TimeField],"dd/mm/yy hh:nn am/pm")
 
T

The Bhoy

Hi Wayne

Thanks for your advice, I've been using Office since it started and this is
my first venture into Access.

Kind regards
Brian

Wayne-I-M said:
I think you may be confused about what you input and what is really in the DB

You can set the Input mask (to short time) to give you 18:30
And you can set the field format to this as well
But this is not what is stored
You store the full time date value in any time date field - even if you
can't see it.

Just play around with the format property of the field until you are happy
with the result and then set the input mask to the same.

--
Wayne
Trentino, Italia.



The Bhoy said:
Hi Wayne

Thanks for your answer, I'm grateful.

On the second part you replied to: FullTime:
Format([TableName]![TimeField],"dd/mm/yy hh:nn am/pm") Can this be adapted to
be input in the 24 hour format, i.e. 18:40 instead of 6:30PM?

Kind regards
Brian

Wayne-I-M said:
I would like to calculate the hours and minutes between 2 dates and times
i.e.
Friday 2nd January 2009 10:00 and Saturday 3rd January 2009 18:34.

I know the answer will be 32:34, but I need to put that into a formula for
access.

Try this
http://office.microsoft.com/en-us/access/HA011102181033.aspx?pid=CL100570041033



Also, (sorry) how do I write an expression for the input mask for the field
to show the date and time i.e. 02/01/09 10:00?

FullTime: Format([TableName]![TimeField],"dd/mm/yy hh:nn am/pm")
 

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