Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Processnico
#813212
Goodmorning,
I want to know how get in output file the datetime in (d-m-Y). Because when i put the datetime in a outputfile the result is (y-m-d h-m-s), I don't want hours,min and seconds. I also used triggers but i don't know how to get the format that i want.
Attachments
dateee.png
This is my datetime and i edit the format in d-m- but the result is different when i put it on the file.
dateee.png (28.54 KiB) Viewed 4104 times
By Processnico
#813215
When i used codes to get a format "d-m-Y", @@stringa result blank.
Attachments
trigger.png
trigger.png (47.23 KiB) Viewed 4087 times
User avatar
By amosbatto
#813226
To get the formatted date, you need to use the @@date_label variable, not the @@date variable. Turn on Debug Mode to see the values that are getting saved.

If your trigger is set to executes after the Dynaform where the user set the "date" variable, then you can use this trigger code:
Code: Select all
@@stringa = @@date_label;
If you want to see the formatted date in an Output Document, then put this in the template:
Code: Select all
Text...
Date:  @#date_label
...More text
By Processnico
#813234
I should to create a new variable @@date_label?
Because @@date is a variable type Datetime.
By Processnico
#813235
The output is this when i type the date. I want a different format in output like d-m-Y.
Is there a solution to have in output this format (d-m-y)?
Attachments
Immagine2.png
Immagine2.png (4.36 KiB) Viewed 4078 times
User avatar
By amosbatto
#813252
You don't have to create the @@date_label variable. It should already exist. See: http://wiki.processmaker.com/3.0/Output ... _Variables

When a Dynaform containing datetime field with the variable named "date" is submitted, it creates two variables @@date and @@date_label.
@@date has the datetime in the format "YYYY-MM-DD HH:MM:SS" and @@date_label has the format which you configured in the "format" property (which in your case will be "DD-MM-YYYY").

Did you turn on Debug Mode so you can see the variables when running a case? All this will be obvious if you look at the variables.

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]