Adds hours to a DateTime attribute or variable.
Date | DateTime.AddHours(Numeric-expression)
Where:
Date | DateTime
Is an attribute or variable based on the Date/DateTime data type, to which the method will add a certain number of hours.
Numeric-expression
Is a Numeric expression that indicates the number of hours to be added to the Date | DateTime.
Type returned:
DateTime
Data Types:
DateTime
Generators: .NET, .NET Framework, Java, RPG, Cobol, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
&AppointmentDateTime.AddHours(1) //Adds 1 hours to &AppointmentDateTime variable
&AppointmentDateTime.AddHours(&HoursNmbr + 1) //&HoursNmbr is a variable received as a parameter using the Parm rule.
AddMinutes method
AddDays method