Class EtlVariable.DateUtils

java.lang.Object
scriptella.core.EtlVariable.DateUtils
Enclosing class:
EtlVariable

public static class EtlVariable.DateUtils extends Object
Utility class for ETL file expressions.

Provides format/parse operation for date/time.

  • Constructor Details

    • DateUtils

      public DateUtils()
  • Method Details

    • now

      public String now(String formatPattern)
      Returns a current date/time formatted according to the specified format.
      Parameters:
      formatPattern - format pattern as specified by SimpleDateFormat.
      Returns:
      formatted string representation of current date/time.
      See Also:
    • format

      public String format(Date date, String formatPattern)
      Formats a specified date/time according to the specified pattern.
      Parameters:
      date - date to format.
      formatPattern - format pattern as specified by SimpleDateFormat.
      Returns:
      formatted string representation of the specified date/time.
    • parse

      public Date parse(String dateStr, String formatPattern) throws ParseException
      Throws:
      ParseException
    • now

      public Date now()
      Returns the current date.
      Returns:
      current date/time.
    • today

      public String today()
      Returns the formatted representation of current date.

      Time part is skipped.

      Returns:
      formatted representation of current date.
    • today

      public String today(String formatPattern)
      A synonym for now(String).
      Parameters:
      formatPattern - format pattern.
      Returns:
      formatted date.