General discussion

Locked

Access 2000 - adding time

By phingers ·
I have a form which calculates number of minutes form other fields in the DB. I want to add this number to another field "start time" which is formatted as time. e.g. 07:00 [formatted as time] + 15 minutes [formatted as number]. Is there any wayof doing this, or can I convert the 15 mins to time somehow and add it to the start time? Can you help, I'm running out of time!

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 2000 - adding time

by adel_ibrahim In reply to Access 2000 - adding time

do the following:
[start time] + CDate("00.15")
or creat a new text box(formatted as Short Time) and put in the Default Value (CDate("00.15").
you will succeed

regards

Collapse -

Access 2000 - adding time

by phingers In reply to Access 2000 - adding time

I couldn't get either of those to work. The first one just returned the start time and the second came up Name?
Is there a way I can use another field name rather than "00:15", because the 15 mins value changes with each record.

Collapse -

Access 2000 - adding time

by RichTee In reply to Access 2000 - adding time

Use the following value to add 15 minutes to another value that is formatted as time:

0.0104166666666667

This field should also be formatted as time.

Hoep this helps.
Rich

Collapse -

Access 2000 - adding time

by phingers In reply to Access 2000 - adding time

Please see the above reply - the value changes with each record

Collapse -

Access 2000 - adding time

by RichTee In reply to Access 2000 - adding time

As a follow up to my answer #2:

Here is an example for you to use this on a form: Create a new field on your form you want to show as the ?time plus 15 minutes?. If the time you want to add the 15 minutes to is named ?dteFirstTime?, then, use the following as the Control Source for the new field:

=[dteFirstTime]+0.0104166666666667

This new filed will bring back the 'First Time' plus 15 minutes for each record.

If this is not what you want, please add more to your description to clarify your question.

Hope this gets you on your way.
Rich

Collapse -

Access 2000 - adding time

by phingers In reply to Access 2000 - adding time

Thanks for your answer - to clarify: I want to add [start time] (format time) to (calculated based on other fields and format number). e.g. time taken may be 15 mins, which can be 0.25 or multiplied by 60 to give 15 mins. This value will change, I was using 15 mins as an example, but it could anything.

Collapse -

Access 2000 - adding time

by adel_ibrahim In reply to Access 2000 - adding time

do the follwing:
[start time]+CDate("00"+"."+Str())
regards
adel

Collapse -

Access 2000 - adding time

by phingers In reply to Access 2000 - adding time

Excellent - it works Many Thanks for your help!

Collapse -

Access 2000 - adding time

by phingers In reply to Access 2000 - adding time

This question was closed by the author

Back to Software Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums