# YYYY-MM-DD merge tag

**URL:** <https://community.gravityforms.com/t/yyyy-mm-dd-merge-tag/5582>\
**Category:** Get Help\
**Tags:** gravity-flow\
**Created:** [July 30, 2020, 9:42pm UTC](https://community.gravityforms.com/t/yyyy-mm-dd-merge-tag/5582 "2020-07-30T21:42:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashevillewebhosting](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@ashevillewebhosting](https://community.gravityforms.com/u/ashevillewebhosting)\
**Post date:** [July 30, 2020, 9:42pm UTC](https://community.gravityforms.com/t/yyyy-mm-dd-merge-tag/5582/1 "2020-07-30T21:42:49Z")

</div>

Hello!

I have a hidden date field (YYYY-MM-DD) that I want to populate with the current date using Gravity Flow’s update field workflow step. The goal being, I want to use Gravity View to filter entries based on when a particular step occurred in the workflow.

Is there a merge tag that will work for this format, or can I create a custom one (and how?)

Thanks in advance for any advice!

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [July 31, 2020, 4:13am UTC](https://community.gravityforms.com/t/yyyy-mm-dd-merge-tag/5582/2 "2020-07-31T04:13:56Z")

</div>

Hello. In Gravity Forms, you can do that with the gform\_field\_value filter:

> **[gform\_field\_value\_$parameter\_name - Gravity Forms Documentation](https://docs.gravityforms.com/gform_field_value_parameter_name/)**
>
> This filter is executed before displaying each field and can be used to dynamically populate fields with a default value.

However, because you want to do that with a Gravity Flow workflow step, I do not think the same filter applies. I recommend asking their support for the proper way to do that in Gravity Flow. Thank you.

---

<div class="post-metadata">

**Author:** ![ashevillewebhosting](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@ashevillewebhosting](https://community.gravityforms.com/u/ashevillewebhosting)\
**Post date:** [July 31, 2020, 8:07pm UTC](https://community.gravityforms.com/t/yyyy-mm-dd-merge-tag/5582/3 "2020-07-31T20:07:35Z")

</div>

Thanks Chris!

Just to confirm - all variations of the gravity forms date field stores in the database as MM/DD/YYYY or DD/MM/YYYY and not MM-DD-YYYY or DD-MM-YYYY?

If I’m unable to save the date with dashes, I can update the field after using the below snippet:

add\_action( ‘gravityflow\_step\_complete’, ‘sh\_gravityflow\_step\_complete’, 10, 4 );  
function sh\_gravityflow\_step\_complete( $step\_id, $entry\_id, $form\_id, $status ) {  
if ( $step\_id == ‘302’ ) {  
$entry = GFAPI::get\_entry( $entry\_id );  
if ( ! is\_wp\_error( $entry ) ) {  
GFAPI::update\_entry\_field( $entry\_id, ‘355’, date\_i18n( ‘Y-m-d’, $local\_timestamp, true ) );  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 4, 2022, 5:58pm UTC](https://community.gravityforms.com/t/yyyy-mm-dd-merge-tag/5582/4 "2022-01-04T17:58:15Z")

</div>


