Time & Date Stamp

Seb

Registered User.
Local time
Tomorrow, 03:58
Joined
Jun 20, 2006
Messages
55
I have a CSV file that is going to be imported into a DB.
the CSV file has a field that has a date & time stamp and I need to be able to store this file as 2 seperate fields....
the field would look something like this:

5/10/2006 17:00

I would like to store the datestamp and possibly the timestamp but the timestamp is not very NB!
 
You might try :
Table 1 : Field - datestamp > datatype = date/time ,format short date and defualt value =Date()

Table 1 : Field - Timestamp > datatype= date/time, format short time and default value =Now()

Hth
 
I don't understand why you want to store the date and time as separate fields. It would seem more sensible to store this as one date/time field and simply extract whichever part of that you need when you need it.
 
thanks for the reply....the reason I want to keep the date and not the time is due to the time not being necessary....
But if I kept both, how would I search for the date in a field like that?
 
Just so you know, Access stores date/time as a decimal number. The integer part represents the date and the decimal fraction is the time.

There are number of ways to extract the date from a date/time field. You can use DatePart(), or Day(), Month() and Year() or you could use Format().
 

Users who are viewing this thread

Back
Top Bottom