Official Content

Adds seconds (and optionally milliseconds) to a DateTime value.

Syntax

TAdd(DateTime-expression, Numeric-expression)

Where:

DateTime-expression 
   Is any valid expression that can involve constants, functions, methods, Procedures, variables, attributes, Inline Formulas. The result must match the DateTime data type.

Numeric-expression
   
It corresponds to the number of seconds (and optionally milliseconds) to be added. It can be any valid expression that can involve constants, functions, methods, Procedures, variables, attributes, Inline Formulas. The result must match the Numeric data type.

Type Returned:
DateTime

Scope

Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generators: .NET, .NET Framework, Java, Apple, Android,Angular

Description

Returns a DateTime value after adding a numeric-expression seconds and milliseconds to a DateTime-expression.

Samples

Suppose you want to add 10 seconds to the current date and time:

&FinalDateTime = TAdd(now(), 10)

Now, suppose you want to add 10 seconds with 230 milliseconds to a DateTime variable that supports Milliseconds:

&FinalDateTime = TAdd(now(), 10.230)

See Also

TDiff function
AddSeconds method



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant