By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

New User Needs Help with Dates

P: 6
I'm beating my head against the wall (not to mention all the time I'm spending searching for an answer to what seems like a simple task. I'm brand new to Access, but it would seem that even the new user could do this.

I have two fields TDate and TDateTime, they are both strings and they look like:

6/11/2006 and 6/11/2006 11:30:00 AM, respectively.

I cannot figure out how to convert these to recognizable date/time values. I've read where Cdate is the answer for the latter. No luck with that function.

Would someone be willing to spell out the details for me? I would be indebted.

Jul 8 '06 #1
Share this Question
Share on Google+
3 Replies

P: 179
What exactly do you mean by "recognizable" date/time values? I recognize these values.

Jul 9 '06 #2

P: 6
What exactly do you mean by "recognizable" date/time values? I recognize these values.

Recognized by Access as Valid, Legitimate dates that you can sort on and do other things with, such as before this date, after this date, and between these two dates. Ideally, I want to be able to compare two variables (CheckDateTime and HarvestDateTime) such as 11/20/2006 12:03:00 PM vs 11/19/2006 11:50:00 AM and determine how much difference is between them. Can't do math on text.

Does that clear things up?

Sorry for the confusion.

Thanks for the reply.

Mike :)
Jul 9 '06 #3

P: 179
I'm still not 100% sure of what you're trying to do. Your date values should not be set up as text. their data type should be date/time.

But, here are a few of functions to try:

DateDiff - it calculetes the difference between 2 dates.
DateAdd - it allows you to add 2 dates.
DateSerial - it allows you to find a future value of a date.

You can get details on all of these under the help files in Access.

Hope this helps.
Jul 10 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.