---
title: "Set a date field to today's date"
canonical: "https://support.appfire.com/space/JMWEC/465504562/Set%20a%20date%20field%20to%20today's%20date"
format: markdown
---
> Macro (aura-html)

### Abstract

This code snippet sets a date field to today's date 

### Logic

Pass today's date

### Snippet 

```javascript
{{ now }}
```

###   
Context

The output of the code snippet is a [Moment.js](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466323491)<span style="color: #333333"> date object</span> which you could use to:

- Set <span style="color: #333333">a Date/Date-time picker field - Eg: Set the Due date to today in</span>
  - one of the Set Field Value post-functions
  - one of the Transition issue post-functions on the transition screen, if any
  - in the Create issue post-function under Set fields of new issue section
- <span style="color: #333333">Conditionally execute a post-function or Unlink issues - Eg: Estimated delivery date is less than today</span>
  
- <span style="color: #333333">Notify the customer when the issue has been rejected as invalid through the</span>
  - Comment in one of the Comment issue post-functions
  - Subject/HTML body/Text body of Email issue post-function
    
- <span style="color: #333333">Write a JQL search expression in Link issues to current issue post-function. Eg: Link issues which have been created since yesterday</span>
  

### References

- [date filter](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466323491)
- [Accessing the fields of an issue](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465373107)

### Related articles

> Macro (contentbylabel)

> Macro (details)
> 
> | Related issues |  |
> | --- | --- |