View Full Version : Access date field trouble

07-25-2002, 05:37 PM
Hi guys and gals

I'm trying to insert a date into a field in an Access table. This field is of the General Date type. I want the date to be entered as "dd/mm/yyyy hh:mm:ss" and this works fine until I try and enter the time part as 00:00:00 in which case the field only records the date part and not the time :( .

My question is how can I add "01/01/2002 00:00:00" and get the whole lot to be stored, not just the date part?

Thanks for any help

07-30-2002, 04:49 AM
last time i use Access too, but now i using SQL server. i think there is a firld type called datetime... or may be called datestamp.

to get the time & date, use now() or formatdatetime(now(),3)
the number "3" u can try 1 until 5.... c what u get n use it that u want...

07-31-2002, 01:06 AM
Have you tried using Date/Time as the data type?

08-01-2002, 05:53 AM
Your trying to save the time and the date?
or just the time?
or just the date?

Well, if you add Now() to you db, it will give you the date and time of submition.

In you db, you can select what type of information to show in the db.

If you select "Long Date" It will show:

But if you click on it, you can also see it does store the time:

Does this help?

And if that's not what you were asking, maybe you should think about what TIME is.

Time is never 00:00:00. Time goes from 12:00:00 to 1:00:00 and not to 13:00:00 nor 00:00:00. If you are manually putting in the time and date, you should look at your clock and say, well it's 11:54:00PM
Seeing how time doesn't metter too you, but it's really close.

In other words, if you are going to add the date at all, just use NOW()

You can also set it as the default text for your date/time field.

08-01-2002, 05:55 AM
And a last question. Why do you need that time 00:00:00?