Unanswered: Couple of Questions, Import and Time difference
I am new to access and have a coople of questions:
When I import a spreadsheet from Excel, it has 4 coulms, 2 Dates and 2 Times. When in Access the Dates have a Time (12:00AM) by the time, and the Times have a date, which is not the same as the date, in th date coulmn, and if no time 0:00 is displayed.
I only want the date and time, and if blank leave blank.
The columns have DateA and TimeA, DateB and TimeB, I want to be able to subtract DateB and TimeB away from DateA and TimeA, thus giving me the difference betweeen the two in hours and minutes. The dates may be more than 24 hours aprart, so it has to coupe with up to the difference of up to 4 days.
Did you think about merging Date and Time values in same field and use DateDiff() function to resolve difference between them?
Hours=DateDiff("h", DateTimeB, DateTimeA) 'will gove you hour difference
Minutes=DateDiff("n", DateTimeB, DateTimeA) mod 60 'will give you remaining minutes.