If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Dates and times
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 |
#2
|
|||
|
|||
Dates and times
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/ac...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") -- Wayne Trentino, Italia. |
#3
|
|||
|
|||
Dates and times
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" wrote: 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/ac...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") -- Wayne Trentino, Italia. |
#4
|
|||
|
|||
Dates and times
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" wrote: 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" wrote: 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/ac...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") -- Wayne Trentino, Italia. |
#5
|
|||
|
|||
Dates and times
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" wrote: 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" wrote: 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" wrote: 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/ac...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") -- Wayne Trentino, Italia. |
Thread Tools | |
Display Modes | |
|
|