TestOptimal Wiki

Model-Based Testing (MBT)

User Tools

Site Tools


how_do_i_format_a_date_time

Format Date/Time

The date/time can be formatted using the standard java date format syntax.

Below are a few examples:

  <log msg="$date('today', 'MM-dd-yyyy')"/>
  <log msg="$date('tomorrow', 'MM/dd/yy')"/>
  <log msg="$date('+2D', 'yyyy-MM-dd)"/>
  <log msg="$time('now', 'MM/dd/yyyy HH:mm')"/>
  <log msg="$time('+2H', 'HH:mm')"/>
  <log msg="$time('-10M', 'HH:mm:ss')"/>
how_do_i_format_a_date_time.txt · Last modified: 2016/09/22 02:35 (external edit)