Now()
returns the current date in format ‘yyyy-MM-dd HH:mm:ss.ms
![](http://media.zeroone.today/wp-content/uploads/2022/09/now.png)
date(selected_date)
Returns selected_date in format ‘yyyy-MM-dd HH:mm:ss.ms’
![agreagate function date()](http://media.zeroone.today/wp-content/uploads/2022/09/date.png)
![](http://media.zeroone.today/wp-content/uploads/2022/09/now.png)
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
![](https://media.zeroone.today/wp-content/uploads/2022/09/diff-1.png)
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
![](https://media.zeroone.today/wp-content/uploads/2022/09/isAfter-1.png)
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.
![](https://media.zeroone.today/wp-content/uploads/2022/09/isBefore-1.png)
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
![](https://media.zeroone.today/wp-content/uploads/2022/09/isBetween-1.png)