I've been racking my brain on this for a while and can't find an easy solution. My program reads in a text file which includes a “time of day” field, without a corresponding date (e.g. one record may have 2:12:35 AM, and another record may have 11:36:58 PM). The times are in no specific order. Knowing the date and time that the program started (e.g. the program may start at 1:31:14 AM on 5/20/05), I need to compute the date of those records in the text file. Using the examples, the 2:12:35 AM record would be 5/20/05 and the 11:36:58 record would be 5/19/05. I think the logic should somehow relate the input time to midnight as well as the time the program started to accurately compute the date. The program may start at any time of the day, and the input records may have any time of the day. Another example, suppose the program starts at midnight (00:00:00 AM) on 5/20/05 and a text record comes in with 11:59:59 AM. Do I consider the date to be 5/19/05 or 5/20/05? Similarly, if the text record has 12:00:00 PM, is the date 5/20/05 or 5/19/05?
Thanks for any help.
Elliot
Thanks for any help.
Elliot