Discussion Locked

CDate function in Access2000

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Re: Question https://www.techrepublic.com/forumqa/thread_detail.jhtml?thread_id=107753

In Access2000 I am using CDate to add [time taken] (number calculated) + [start time] using the following expression: [start_time]+CDate("00"+"."+Str([time taken]))

This works fine when [time taken] is less than 60 mins and rounded to whole minutes but how do I get it to work if [time taken] is more than 60 mins and not rounded?

5 replies

by rhys

If I understand your question then it looks like you should be using the DateAdd function. Try

DateAdd("n", TimeTaken, StartTime)

See the online help for DateAdd and remember that the minute interval is "n" ("m" is month!).

Regards, Rhys

by phingers

That's the one! I wish you'd answered before. Seeing as that was easy for you, before I award the points can you answer one more question? How do I get this new time [finish time] to be the default value for the next records' [start time]? I tried putting in =[finish time] as the default value in the form field but this doesn't work?

by sl-campbell

>Seeing as that was easy for you, before I award the points....

But it was not easy for You!
You agreed when you posted the question to award the points for the answer to the given question....so, do so!

The second question is just as easy, even easier.
For the sake of the person who posted the answer, I will not offer an answer here.

So, in the future, consider first what you are doing when you are entering an "agreement". Some people do take this seriously, and offer free time to help out.

I didn't post the answer, but hope the one who did comes back for the points at the most.

I do not care about the points myself, nor does this forum interest me much anymore, mainly because of others taking it for granted.

Don't be surprised if you don't get any answer, or for future questions, less answers than what you may expect.

by phingers

I'm sorry to have upset you by this. I would like to point out that I did ask the question if it would be ok to ask another - it was up to you if you did or not, you'd get the points either way.

I only asked again as it is so hard to get the right answer from someone who knows their stuff and I thought I might try to get some more help whilst I had your attention.

Please put your handbag back down.

This discussion is closed to new replies.