How to set "Date-Time Picker" custom field with current date-time
Hello,
I'm trying to set a date to a date-time filed using "Mathematical or date-time expression calculator"
I want to store in the filed the current time how can I do it?
Thanks!
Comments (13)
-
repo owner -
Account Deactivated reporter Great, so simple :)
-
repo owner - changed status to resolved
-
Account Deactivated reporter one more followup question: is there an option to set this field only if it's empty?
-
Account Deactivated reporter - changed status to open
-
repo owner Yes, use the following expression:
{nnnnn} = null ? {00057} : {nnnnn}
where {nnnnn} is the field code of target field.
-
Account Deactivated reporter Thanks Fidel. I did it and got:
Field Solution Provided will be assigned with the calculation result of the formula: {12303} = null ? {00057} : {12303} :: PARSE ERROR : Encountered " "=" "= "" at line 1, column 9. Was expecting one of: "+" ... "-" ... "*" ... "/" ...
What am I missing?
-
repo owner Which version of the plugin are you using?
-
Account Deactivated reporter 2.1.19
-
repo owner It doesn't work because conditional operator ? : is not implemented in that version. You should update.
-
Account Deactivated reporter Yep, works well after upgrade.
Thanks!
-
Account Deactivated reporter - changed status to resolved
-
repo owner - changed title to How to set "Date-Time Picker" custom field with current date-time
- Log in to comment
Hi Shalev,
Glad to have news from you. I hope you are well.
I show you how to do it using an example: Let's suppose we want to set a "Date Time Picker" custom field called "My Date" with current date-time. To do it you have to use "Mathematical or date-time expression calculator" with the following configuration:
Note that {00057} is field code for "Current date and time".
Best regards,
Fidel