Aggregate Functions In ZeroOne for working with dates

目次

Now()

returns the current date in format ‘yyyy-MM-dd HH:mm:ss.ms

date(selected_date)

Returns selected_date in format ‘yyyy-MM-dd HH:mm:ss.ms’

format(date,format)

You can use to convert date to specify format

To Format

  • YYYY-MM-DD
  • MM-DD-YYYY
  • MMMM DD YYYY
  • YYYY/MM/DD
  • MM/DD/YYYY

diff(date1, date2)

return difference between two datetimes in milliseconds

isAfter(date1, date2)

this function returns boolean. If date1>date2 returns true, else false. You also may set variable in type date, like in image

isBefore(date1, date2)

Check if a moment is after another moment. The first argument will be parsed as a moment, if not already so. Returns true if date1<date2 else false.

isBetween(date, startDate, endDate)

Check if a moment is between two other moments, optionally looking at unit scale (minutes, hours, days, etc). The match is exclusive. The first two arguments will be parsed as moments, if not already so. return true if startDate<date<endDate else false

ゼロワンメディアロゴ

この記事が気に入ったら
フォローしてね!

よかったらシェアしてね!
  • URLをコピーしました!
目次