Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save spivurno/f4a5f8adcb03c58aadadde06fa5a6cef to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms // Modify Date Field Format in Entries
<?php
/**
* Gravity Wiz // Gravity Forms // Modify Date Field Format in Entries
* http://gravitywiz.com/
*/
// Replace "123" with your form ID and "7" with your Date field ID.
add_filter( 'gform_get_input_value_123_7', function( $value ) {
// See PHP date() documentation for more details on date formatting: http://php.net/manual/en/function.date.php
$date_format = 'l, m/d/Y'; // i.e. Tuesday, 01/13/1987.
return date( $date_format, strtotime( $value ) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment