Bunky said:
I have a date field that currently has only the month, day and year. I
would
like to add the time to it as well. The input to the append does not have
the time. Can I format a time and have it as part of the date field?
I'm not entirely sure what you have to work with here. It may help to know
that both date and time values are stored in the same specialized
floating-point format -- date values as the integer part, time values as the
fractional part -- so for dates since December 30, 1899 (the "zero" date in
this structure), you can just add time values to date values to get
date/time values. I'm not sure if this works with dates before the zero
date.
Lets suppose that you have two tables, one with the date values and one with
the time values, which share a primary key. Further suppose that both the
date fields and the time fields are of the date/time field type. For
example, suppose you have these tables:
MyDateTable
-------------------
ID (primary key)
DateField (type Date, currently contains only dates)
MyTimeTable
-------------------
ID (primary key, fk to MyDate.ID)
TimeField (type Date, currently contains only times)
Further suppose that all these dates are since 12/30/1899. Then you could
update the date fields in MyDateTable to include the times as well using a
query like this:
UPDATE
MyDateTable INNER JOIN MyTimeTable
ON MyDateTable.ID = MyTimeTable.ID
SET MyDateTable.DateField =
MyDateTable.DateField + MyTimeTable.TimeField
I haven't tested it, but something along those lines ought to work.