Skip to main content

TimeStampAdd

Returns a timestamp calculated by adding N DateTimeParts (for example, three hours) to the specified timestamp.

Syntax

TimeStampAdd(Timestamp, DateTimePart, N)

Parameters

Timestamp
The timestamp to add the specified number of DateTimeParts to.

DateTimePart
The time interval to change the Timestamp by. This parameter supports the following values:

  • d: day
  • h: hour

N
The number of DateTimeParts to add to the Timestamp.

Example

The following expression adds two days to 2008-04-09:

[DateCustom].[Retail445].[Reporting Day].&[TimestampAdd(FloorTime("2008-04-09T11:35:04.201103"), "d", 2)]