Title: change date format
Last modified: August 22, 2016

---

# change date format

 *  Resolved [eleist](https://wordpress.org/support/users/eleist/)
 * (@eleist)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/)
 * hi there,
 * how can i change the date format of the calculated cdate function?
 * from 01/01/2014 to 1. January 2014
 * best regards
 * [https://wordpress.org/plugins/calculated-fields-form/](https://wordpress.org/plugins/calculated-fields-form/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383644)
 * Hi,
 * Do you want display this date format in the calculated field?
 * I’ll describe a situation, that you should adjust it to your particular equation.
 * If your current equation is something similar to: CDATE(…)
 * You should modify the equation like follow:
 * (function(){
    var d = new Date( CDATE(…)); return d.toDateSting(); })()
 * Now, you should open the “module_public.js” file, located in “/wp-content/plugins/
   calculated-fields-form/js/modules/01_mathematical_logical/public/module_public.
   js”, in the text editor your choice, and modify the snippet of code:
 * ‘validator’ : function( v )
    { return isFinite( v ) || /\d{2}[\/\-\.]\d{2}[\/\-\.]\
   d{4}/.test( v ); }
 * like follow:
 * ‘validator’ : function( v )
    { return typeof v != ‘undefined’; }
 * Best regards.
 *  Thread Starter [eleist](https://wordpress.org/support/users/eleist/)
 * (@eleist)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383649)
 * Thanks for your reply.
 * Yes, i want to display this date format in a calculated field. I copied your 
   suggestion into my cal field and modified the snippet of code.
    Result: nothing,
   i got a white field.
 * my equation:
    (function(){ var d = new Date( CDATE(fieldname1+280+fieldname7));
   return d.toDateSting(); })()
 * Fieldname1 is a date and fieldname2 is a value (from -7 til +12)
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383668)
 * Hi,
 * Could you send me a link to your page to check the issue in detail, please?
 * Best regards.
 *  Thread Starter [eleist](https://wordpress.org/support/users/eleist/)
 * (@eleist)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383670)
 * sry, its local. is it possible to export the calculator?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383675)
 * Hi,
 * I’m sorry, my mistake. I’ve typed wrong the method name. Please, use the following
   equation, pay attention to the date format, passed as the second parameter of
   the CDATE operation:
 * (function(){
    var d = new Date( CDATE(fieldname1+280+fieldname7,’mm/dd/yyyy’));
   return d.toDateString(); })()
 * Best regards.
 *  Thread Starter [eleist](https://wordpress.org/support/users/eleist/)
 * (@eleist)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383686)
 * ok it works fine.
 * but where can i but my german time format? d. F Y ?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383696)
 * Hi,
 * In this case you should formatting the text by yourself:
 * (function(){
    var month_names = [‘January’, ‘February’, ‘March’, ‘April’, ‘May’,‘
   June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’, ‘December’]; var
   d = new Date( CDATE(fieldname1+280+fieldname7,’mm/dd/yyyy’)); return d.getDate()
   +’. ‘+month_names[d.getMonth()]+’ ‘+d.getFullYear(); })()
 * Best regards.
 *  Thread Starter [eleist](https://wordpress.org/support/users/eleist/)
 * (@eleist)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383700)
 * Nice one. Thanks a lot.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383701)
 * Hi,
 * A good rating is always appreciated 😉
 * Best regards.
 *  Thread Starter [eleist](https://wordpress.org/support/users/eleist/)
 * (@eleist)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383710)
 * there is one other thing, than you’ll get your rating 😉
 * what is the parameter for today?
 * I want to calculate a figure of weeks from now.
 * case: 40-(280-(todays date – formfield)/7)
 * with no decimal.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383716)
 * Hi,
 * You are using the free version of plugin (in the developer version there are 
   specific operations for dates). So, in this case you can insert another date 
   field, without define a default date (the default values in date fields is the
   today date), and use the new field in the equation.
 * If the field for today is important only for the equations, and it does not have
   any other functionality in the form, you can hide the field from the public webpage
   simply assigning a classname through the “Add Css Layout Keywords” attribute 
   of the field, for example, myclass, and define the new class in any css file 
   of your website:
 * .myclass{display:none;}
 * Best regards.
 *  Thread Starter [eleist](https://wordpress.org/support/users/eleist/)
 * (@eleist)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383717)
 * ok, using a hidden field was my plan b 😉
 * hoped that there is a today dates paramaeter. but ok, no problem.
 * thanks for your work!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘change date format’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [eleist](https://wordpress.org/support/users/eleist/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/change-date-format-16/#post-5383717)
 * Status: resolved