I’m attempting to push a formatted date value into a MySQL datetime field.
I’m converting a date object using the following code that should comply with MySQL datetime fields.
var today = new Date(); // New signup date object
var renew = new Date(); // New renewal date object
renew.setMonth(today.getMonth() + 3);
today = utils.dateFormat(today, 'yyyy-MM-dd HH:mm:ss');
renew = utils.dateFormat(renew, 'yyyy-MM-dd HH:mm:ss');
forms.subsMemberships.mag_group_membership_to_mag_subs.subs_signdate = today;
forms.subsMemberships.mag_group_membership_to_mag_subs.subs_renewdate = renew;
The field on the form (which is shown in a tab panel) is a related field. I have tried referencing the field both through elements (it’s named) and by targeting the field itself through the relationship. Nothing seems to work.
My goal is to have a record created in one table that is related to another table with date values. The date values should be pushed into their respective fields of signdate and renewdate. But I keep getting…
Can’t put in a locked scope, name: signupDate, value: 2003-12-15 20:16:34