Setting default value for imported excel file

J

jer

Some help please. I am importing an excel worksheet into access. The excel
file has a date field formatted with date/time. I am importing to do
calculations based on the time differentials. I have created a date field in
the access separate from the excel's date/time field. Is it possible to set
the default value of the date field in access to be the date portion of the
date/time field in excel
excel field = 2/23/2006 10:33 could the access date field default value be
set to 2/23/2006
 
J

John Nurick

Via default value: no. Instead, use an update query to update the other
field to
DateValue([xxx])
where xxx is the name of the field you imported.

But this is neither desirable nor, probably, necessary. Normal practice
would be to use the DateValue() or TimeValue() functions in queries to
return date or time as required, without having to create and populate a
separate field.
 
J

jer

Thanks John for your quick response. I understand, one more thing though,
and this might be the wrong group but your advice is leading to this. How
can I now create a paramenter query around the date/time for the date only
--
thanks as always for the help


John Nurick said:
Via default value: no. Instead, use an update query to update the other
field to
DateValue([xxx])
where xxx is the name of the field you imported.

But this is neither desirable nor, probably, necessary. Normal practice
would be to use the DateValue() or TimeValue() functions in queries to
return date or time as required, without having to create and populate a
separate field.

Some help please. I am importing an excel worksheet into access. The excel
file has a date field formatted with date/time. I am importing to do
calculations based on the time differentials. I have created a date field in
the access separate from the excel's date/time field. Is it possible to set
the default value of the date field in access to be the date portion of the
date/time field in excel
excel field = 2/23/2006 10:33 could the access date field default value be
set to 2/23/2006
 
J

John Nurick

You could use a calculated field like this:
DateValue([XXX])
with a criterion of
[Enter Date]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top