1 Format

When using string dates or datetimes, the date format should be specified to ensure compatibility with non Informix DBMS.

Example
Copy
<date format="dd-MM-yy HH:mm:ss">'14-04-08 01:02:03'</date>

1.1 Java date format

Formats must follow the Java date and time pattern format:

yy 2-digit year
yyyy 4-digit year
MM 01-12 month
dd 01-31 day
HH 00-23 hour
mm 00-59 minute
ss 00-59 second

2 today

Returns current date.

<today value='year|month|day'/>
Example

If the example were made on February 19, 2008, it would return 2008-02-19.

Copy
<today/>
Values

In these cases it returns a numeric value, not a date.

Copy
<today value="month"/>
<today value="year"/>
<today value="day"/>

3 current

Returns current date and time.

<current />

4 date

Extracts a date.

<date
    trunc='yes|y'
    format='format'
>
    <expresion /> *
</date>
Example
Copy
<select>
   <columns>
      <date format='dd-MM-yy'>'14-04-08'</date>
   </columns>
   <from table='test'/>
</select>

5 mdy

Convert three integer values into DATE format.

<mdy
    d='d'
    m='m'
    y='y'
>
    <d> *
        <day /> *
    </d>
    <m> *
        <month /> *
    </m>
    <y> *
        <year /> *
    </y>
</mdy>
Example
Copy
<mdy d='14' m='04' y='2008' />

6 year

Returns the year of a date.

<year format='format'>
    <value /> *
</year>
Date
Copy
<year><today/></year>
String
Copy
<year format="dd-MM-yy">'14-04-08'</year>

7 month

Returns the month of a date.

<month format='format'>
    <fecha /> *
</month>
Date
Copy
<month><today/></month>
String
Copy
<month format="dd-MM-yy">'14-04-08'</month>

8 weekday

Returns the day of the week represented by numbers from 0 to 6, where 0 equals Sunday, 1 Monday, etc...

<weekday format='format'>
    <value /> *
</weekday>
Date
Copy
<weekday><today/></weekday>
String
Copy
<weekday format="dd-MM-yy">'14-04-08'</weekday>

9 day

Returns the day of a date.

<day format='format'>
    <expresion /> *
</day>
Date
Copy
<day><today/></day>
String
Copy
<day format="dd-MM-yy">'14-04-08'</day>

10 lastday

Returns the last day of the month of a date.

<lastday format='format'>
    <expresion /> *
</lastday>
Date
Copy
<lastday><today/></lastday>
String
Copy
<lastday format="dd-MM-yy">'14-04-08'</lastday>

11 hour

Extract the hour from a date.

<hour format='format'>
    <fecha /> *
</hour>
Date
Copy
<hour><current/></hour>
String
Copy
<hour format="dd-MM-yy HH:mm:ss">'14-04-08 01:02:03'</hour>

12 minute

Extracts the minute of a date.

<minute format='format'>
    <fecha /> *
</minute>
Date
Copy
<minute><current/></minute>
String
Copy
<minute format="dd-MM-yy HH:mm:ss">'14-04-08 01:02:03'</minute>

13 second

Extracts the second of a date.

<second format='format'>
    <fecha /> *
</second>
Date
Copy
<second><current/></second>
String
Copy
<second format="dd-MM-yy HH:mm:ss">'14-04-08 01:02:03'</second>

14 days

Returns the number of days between two dates or datetimes. The start date and the end date can be indicated as attributes or arguments.

<days
    datefrom='datefrom'
    dateto='dateto'
    format='format'
>
    <datefrom format='format'> *
        <date /> *
    </datefrom>
    <dateto format='format'> *
        <date /> *
    </dateto>
</days>
Dates
Copy
<days><datefrom>date_updated</datefrom><dateto>date_created</dateto></days>
Strings 1
Copy
<days datefrom="16-04-18" dateto="14-04-18" format="dd-MM-yy"/>
Strings 2
Copy
<days>
	<datefrom format="dd-MM-yy">'16-04-18'</datefrom>
	<dateto format="dd-MM-yy">'14-04-18'</dateto>
</days>

15 sub-dates

Returns a string with the date difference in days, hours as minutes, with the format: 01d 01h 01m.

<sub-dates
    datefrom='datefrom'
    dateto='dateto'
    format='format'
>
    <datefrom format='format'> *
        <date /> *
    </datefrom>
    <dateto format='format'> *
        <date /> *
    </dateto>
</sub-dates>
Dates
Copy
<sub-dates><datefrom>date_updated</datefrom><dateto>date_created</dateto></sub-dates>
Strings 1
Copy
<sub-dates datefrom="14-04-18 01:02:03" dateto="16-04-18 03:02:01" format="dd-MM-yy HH:mm:ss"/>
Strings 2
Copy
<sub-dates>
	<datefrom format="dd-MM-yy HH:mm:ss">'14-04-18 01:02:03'</datefrom>
	<dateto format="dd-MM-yy HH:mm:ss">'16-04-18 03:02:01'</dateto>
</sub-dates>

16 seconds

Returns the number of seconds between two dates or datetimes.

<seconds
    datefrom='datefrom'
    dateto='dateto'
    format='format'
>
    <datefrom format='format'> *
        <date /> *
    </datefrom>
    <dateto format='format'> *
        <date /> *
    </dateto>
</seconds>
Dates
Copy
<seconds><datefrom>date_updated</datefrom><dateto>date_created</dateto></seconds>
Strings 1
Copy
<seconds datefrom="14-04-18 01:02:03" dateto="14-04-18 03:02:01" format="dd-MM-yy HH:mm:ss"/>
Strings 2
Copy
<seconds>
	<datefrom format="dd-MM-yy HH:mm:ss">'14-04-18 01:02:03'</datefrom>
	<dateto format="dd-MM-yy HH:mm:ss">'14-04-18 03:02:01'</dateto>
</seconds>

17 eval-date

This tag allows you to perform arithmetic operations of addition and subtraction on dates.

<eval-date
    d='d'
    m='m'
    y='y'
    format='format'
>
    <val
        unit='y|m|d|date'
        format='format'
    > *
        <value /> *
    </val>
    <date /> *
</eval-date>
Dates 1
Copy
<eval-date y='1' m='2' d='-3'><today/></eval-date>
Dates 2
Copy
<eval-date>
	<val unit="y">1</val>
	<val unit="m">2</val>
	<val unit="d">-3</val>
	<val unit="date"><current/></val>
</eval-date>
String 1
Copy
<eval-date y='1' m='2' d='-3' format="dd-MM-yy HH:mm:ss">'14-04-18 01:02:03'</eval-date>
String 2
Copy
<eval-date>
	<val unit="y">1</val>
	<val unit="m">2</val>
	<val unit="d">-3</val>
	<val unit="date" format="dd-MM-yy HH:mm:ss">'14-04-18 01:02:03'</val>
</eval-date>

18 eval-datetime

This tag allows you to perform arithmetic operations of addition and subtraction on expressions of datetimes type.

<eval-datetime
    y='y'
    m='m'
    d='d'
    h='h'
    min='min'
    s='s'
    format='format'
>
    <val
        unit='y|m|d|h|min|s|datetime'
        format='format'
    > *
        <value /> *
    </val>
    <date /> *
</eval-datetime>
Dates 1
Copy
<eval-datetime y='1' m='3' d='2' h="7" min="5" s="2"><current/></eval-datetime>
Dates 2
Copy
<eval-datetime>
	<val unit='d'>2</val>
	<val unit='m'>3</val>
	<val unit='y'>1</val>
	<val unit='h'>7</val>
	<val unit='min'>5</val>
	<val unit='s'>2</val>
	<val unit='datetime'><today/></val>
</eval-datetime>
String 1
Copy
<eval-datetime y='1' m='3' d='2' h="7" min="5" s="2" format="dd-MM-yy HH:mm:ss">'14-04-18 01:02:03'</eval-datetime>
String 2
Copy
<eval-datetime>
	<val unit='d'>2</val>
	<val unit='m'>3</val>
	<val unit='y'>1</val>
	<val unit='h'>7</val>
	<val unit='min'>5</val>
	<val unit='s'>2</val>
	<val unit='datetime' format="dd-MM-yy HH:mm:ss">'14-04-18 01:02:03'</val>
</eval-datetime>

19 extend

It allows to increase or decrease the precision of a DATETIME variable.

<extend
    from='from'
    to='to'
    format='format'
>
    <variable /> *
</extend>
Date
Copy
<extend from="year" to="second"><today/></extend>
String
Copy
<extend from="year" to="day" format="dd-MM-yy HH:mm:ss">'14-04-18 03:02:01'</extend>

20 seconds-todsinterval

Given a number of seconds, it generates an interval DAY TO SECOND.

<seconds-todsinterval>
    <num_seconds /> *
</seconds-todsinterval>
Example

Get INTERVAL DAY TO SECOND for 80 seconds.

Copy
<seconds-todsinterval>80</seconds-todsinterval>