Days counting in (date and time) field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All Access users,
Good Day,

I have a problem and looking solution.

DateDiff("d",[ParkingDatetime],[DriveOutDateTime])=day/days
I would like see day only if crossed 23.59 other wise response should be zoo.

Regards,



--
Access Keen User


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...7b03&dg=microsoft.public.access.modulesdaovba
 
You want the records where the ParkingDatetime field is a different date
than the DateOutDateTime?

Try:
DateValue([DateOutDateTime]) - DateValue([ParkingDatetime])


--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
hi,
you can also get a difference in minutes for more accurate result
DateDiff("n",[ParkingDatetime],[DriveOutDateTime])
 
I would like see day only if crossed 23.59 other wise response should
be zoo.

hi,
you can also get a difference in minutes for more accurate result
DateDiff("n",[ParkingDatetime],[DriveOutDateTime])

AIUI, he actually wants the exact opposite of this...

Tuesday 23:58 to Wednesday 00:02 = 4 minutes but 1 day

Tuesday 00:02 to Tuesday 23:58 = 1436 minutes but 0 days.


I think the DateValue(b) - DateValue(a) is the way to go.

All the best


Tim F
 
Back
Top