Date Comparison

In Data Mapper, you can compare date and time using Date-difference function under Date functions. Date-difference function takes two dates as inputs (which you want to compare) along with their date-formats and the return the difference in milliseconds. Following is an example of date-difference function which subtracts the first date from second date and return 3600000 milliseconds, which is equal to one hour :

date-difference('12-08-2005 13:00:00','dd-mm-yyyy HH:MM:SS','12-08-2005 12:00:00', 'dd-mm-yyyy HH:MM:SS') .

If First Date >= Second Date, then the result is > = 0 else < 0.

For any help on date-difference function, please refer to Help > Developer Guide > Transforming Data > Using Data Mapper > Using Mapping Functions > Using Date Function.

Have more questions? Submit a request

0 Comments

Article is closed for comments.