G gokari New member Local time Today, 16:53 Joined Apr 21, 2016 Messages 3 Apr 21, 2016 #1 Hi there, I'm stuck with queries and I need a help please. I need to calculate how many days from one date to another. Everyone else can use the same formula except me. Nights stay[Discharge Date]-[Date Admitted]) Thank you x
Hi there, I'm stuck with queries and I need a help please. I need to calculate how many days from one date to another. Everyone else can use the same formula except me. Nights stay[Discharge Date]-[Date Admitted]) Thank you x
pbaldy Wino Moderator Staff member Local time Yesterday, 19:53 Joined Aug 30, 2003 Messages 36,157 Apr 21, 2016 #2 Not sure what you're saying, as it appears to be working. You can use the DateDiff() function.
G gokari New member Local time Today, 16:53 Joined Apr 21, 2016 Messages 3 Apr 25, 2016 #3 Supposed to calculate 3 days but it calculates 91 days instead.
S Simon_MT Registered User. Local time Today, 03:53 Joined Feb 26, 2007 Messages 2,170 Apr 26, 2016 #4 What the two days being used? Simon
pbaldy Wino Moderator Staff member Local time Yesterday, 19:53 Joined Aug 30, 2003 Messages 36,157 Apr 26, 2016 #5 Are they date/time fields? Looks like a date format problem, as the result looks correct with dates in US format.
Are they date/time fields? Looks like a date format problem, as the result looks correct with dates in US format.
pbaldy Wino Moderator Staff member Local time Yesterday, 19:53 Joined Aug 30, 2003 Messages 36,157 Apr 26, 2016 #6 Oh, and shouldn't the fields be reversed?
G gokari New member Local time Today, 16:53 Joined Apr 21, 2016 Messages 3 Apr 26, 2016 #7 Thank you very much. I will try it now.