Returns the instance of the object TimeStamp passed as argument or attribute.

1 date.timestamp

<date.timestamp
    dd='dd'
    MM='MM'
    yy='yy'
    hh='hh'
    mm='mm'
    ss='ss'
    SS='SS'
    Z='Z'
    format='format'
>
    <time /> *
    <time /> *
    <time /> *
</date.timestamp>
Example

Example in which it returns the TimeStamp of the date entered as attribute.

Copy
<xsql-script name='date_timestamp_sample1'>
    <body>
        <println><date.timestamp dd='10' MM='12' yy='2006' hh='12' mm='30' ss='40' SSS='355'/></println>
    </body>
</xsql-script>

Devuelve:

Copy
10-12-2006 12:30:40
Example

Example in which it returns the TimeStamp passing the date as attribute Ejemplo en el que devuelve el TimeStamp pasando la fecha como argumento.

Copy
<xsql-script name='date_timestamp_sample2'>
   <body>
       <set name ='date'>
           <date format='dd-MM-yyyy'>01-01-2004</date>
       </set>
       <println><date.timestamp><date /></date.timestamp></println>
   </body>

</xsql-script>

Returns:

Copy
01-01-2004 00:00:00
Example

Example in which it returns the TimeStamp passing the date/time as argument tyoe date and the format as attribute.

Copy
<xsql-script name='date_timestamp_sample3'>
   <body>
       <println><date.timestamp format='dd-MM-yyyyy HH:mm:ss'>01-12-2006 12:00:30</date.timestamp></println>
   </body>

</xsql-script>

Returns:

Copy
01-01-2006 12:00:30