DP - date parser

DP: date parser (Creates a date or a time span from text)


dp(date, [pattern])


  • date: Date to be used. The Date can be returned by some other function or you can use text. For text dates you can both set it statically using the format '1955y11M12d22h04m00s' to express year 1955, month 11, day 12 at 22:04:00 (all fields are optional), or use 'a/r' (add/remove) operators, so, for example 'a12m3s' will add 12 minutes and 3 secs to current date.
  • pattern: A standard Java Date Time format pattern to parse the date


$dp(0h0m0s)$Today's midnight
$dp(01M01d0h0m0sa1y)$New year's eve
$dp("2010-07-30T16:03:25Z", auto)$Parse date string using ISO / auto format
$dp(05-07-2010, dd-MM-yyyy)$Parse date string using custom date format

Privacy Policy