TomCarnahan
Programmer
I am working with tables from another application where the Date and Time data elements have been separated. Instead of the Access data type that includes both (e.g. 5/23/07 8:07 AM), the date is separated (e.g. 5/23/07) from the time (e.g. 8:07 AM) into two fields.
The existing table records events with a [DateField], a [StartTimeField] and a [EndTimeField].
The algorithm I want to use requires that they be recombined in a single field. I figured out how to do it in most cases:
[DateField] + DateValue[TimeField]
This works fine except where the [EndTimeField] passes midnight. Example:
Date: 7/10/07
Start: 6:00 pm ==> "7/10/07 6:00 PM"
End: 11:00 pm ==> "7/10/07 11:00 pm"
BUT:
Date: 7/10/07
Start: 6:00 pm ==> "7/10/07 6:00 PM"
End: 12:00 am ==> "7/10/07"
Does anyone have an idea of how to work around this?
Thanks,
--- Tom
The existing table records events with a [DateField], a [StartTimeField] and a [EndTimeField].
The algorithm I want to use requires that they be recombined in a single field. I figured out how to do it in most cases:
[DateField] + DateValue[TimeField]
This works fine except where the [EndTimeField] passes midnight. Example:
Date: 7/10/07
Start: 6:00 pm ==> "7/10/07 6:00 PM"
End: 11:00 pm ==> "7/10/07 11:00 pm"
BUT:
Date: 7/10/07
Start: 6:00 pm ==> "7/10/07 6:00 PM"
End: 12:00 am ==> "7/10/07"
Does anyone have an idea of how to work around this?
Thanks,
--- Tom