This is my first database in Access and I've been able to format and add date under 60 mins using the dateadd function... but I can't add dates OVER 1 hour like, 1:20, 1:25...etc...it just says type mismatch, and I can't find any solution to this problem, neither Microsoft or the web gives me any example of the Dateadd function when it comes to add hours + minutes ....
"n" = format any minute amount from 0 to 59 depending the case
"H:N" = format hours from 1 to 24 and from 0 to 59 minutes depending the case
d = 1:20(one hour and twenty minutes)(datepa rt) or 0:20(twenty minutes)(datepa rt)
l = The "actual" time (8:00 AM) (current time)
ex. Dateadd("n", "0:20", 8:00 AM)
Already did the example above (d = 0:20) in the program , It returns me 8:20 AM without a problem, but. the next one...
ex. Dateadd("H:N"," 1:20", 8:00 AM)
The above example should return "9:20 AM" but instead it returns syntax error, If I replace the "h:nn" to "n" it accepts the entry but assigns only "20" minutes, is this the correct way to format this?
Code:
DateAdd("n", d, l)
Code:
DateAdd("H:N", d, l)
"H:N" = format hours from 1 to 24 and from 0 to 59 minutes depending the case
d = 1:20(one hour and twenty minutes)(datepa rt) or 0:20(twenty minutes)(datepa rt)
l = The "actual" time (8:00 AM) (current time)
ex. Dateadd("n", "0:20", 8:00 AM)
Already did the example above (d = 0:20) in the program , It returns me 8:20 AM without a problem, but. the next one...
ex. Dateadd("H:N"," 1:20", 8:00 AM)
The above example should return "9:20 AM" but instead it returns syntax error, If I replace the "h:nn" to "n" it accepts the entry but assigns only "20" minutes, is this the correct way to format this?
Comment