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" = format hours from 1 to 24
d = 1:20(one hour and twenty minutes)(datepart) or 0:20(twenty minutes)(datepart)
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",1, 8:00 AM)
The above example will return 9 AM
Im a little confused about using the dateadd() function, because If I were to add "2:30" or 4:00 (interval) to the equation, I don't know how to put that, I'd had to convert it to minutes (2:30 = 150 mins, 4:00 = 240 mins) is this correct? I've only seen examples with intervals in entire hours or minutes, but nothing combining both, i guess since its an interval I can't have both?...
Code:
[FONT='inherit']DateAdd("n", d, l)[/FONT]
Code:
Code:
[FONT='inherit']DateAdd("H", d, l)[/FONT]
Code:
"n" = format any minute amount from 0 to 59 depending the case
"H" = format hours from 1 to 24
d = 1:20(one hour and twenty minutes)(datepart) or 0:20(twenty minutes)(datepart)
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",1, 8:00 AM)
The above example will return 9 AM
Im a little confused about using the dateadd() function, because If I were to add "2:30" or 4:00 (interval) to the equation, I don't know how to put that, I'd had to convert it to minutes (2:30 = 150 mins, 4:00 = 240 mins) is this correct? I've only seen examples with intervals in entire hours or minutes, but nothing combining both, i guess since its an interval I can't have both?...