Date and Time Functions

Top Previous Topic Next Topic  Print this topic

Date and Time functions are useful for when you are working with data related specifically to dates and times.  In this section, you will find useful information on the available date and time functions that are found in the Functions Dialog.

dt_intro

Figure 1:  The available Date and Time Functions in the Functions Dialog.

Usage

To insert a Date and Time Function, select Functions in the Side Menu to access the Functions dialog.  Here you can scroll to find the Date and Time functions group.  Once you select a function for insertion, you will notice that the Function Object will be displayed in the Design Surface. Here you can reposition, resize, and map your data accordingly by creating Data Connections.  In this section, you will find detailed on information on each of the Date and Time Functions.

 

Now

dt_now

The Now Function is used to return the current date and time, according to the local machine.

UTC Now

dt_utcnow

The UTC Now function is used to return the current date and time, according to the local machine's time, the selected time zone and the Daylight Saving if applicable.

Add Date

dt_adddate

The Add Date function is used to add date values to input date values.  It is important to note that this function requires an input date data connector as well as a ticks data connector.  Both connectors must be of the datetime date type.

Diff Date

dt_diff

The Diff Date is used to return the number of ticks between the two specified input date values.

Day

dt_day

The Day function is used to return the day from a given input datetime input data field.

Month

dt_month

The Month function is used to return the month from a given input datetime input data field.

Year

dt_year

The Year function is used to return the year from a given input datetime input data field.

Add Days

dt_adddays

The Add Days function is used to add a specified number of days to an input date parameter.

Add Months

dt_addmonth

The Add Months function is used to add a specified number of months to an input date parameter.

Add Years

dt_addyear

The Add Years function is used to add a specified number of years to an input date parameter.

To String

dt_tostring

This function is useful for converting datetime input data values into strings in your output data source.  The To String function uses two input parameter data connectors.  One is for the input date to be used, and the other must be a specified string format (such as YYYY-DDDDD).