Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By azatrath
#816097
hi all,

any chance to change date/datetime format ? i am using PM 3.2.1 Commmunity and using pmtable to store.
pmTable store such as *DATE is a date that is stored in the format YYYY-MM-DD, such as 2010-07-25. *

but we are using DD-MM-YYYY and i have to get date/date time like that. showing time like that is making trouble for us.
Attachments
Adsız.png
Adsız.png (8.39 KiB) Viewed 2610 times
User avatar
By amosbatto
#816121
In your PM Table, use char or varchar instead of date or datetime fields.
Then, you should be able to store your dates as strings.

If you want to be able to display your dates in ProcessMaker, use textbox fields rather than datetime fields.
If you want the user to be able to use the dates in a datetime field in a Dynaform, then you will need to convert your dates to standard YYYY-MM-DD format with a bit of PHP:
Code: Select all
$result = executeQuery("SELECT MY_DATE FROM PMT_MY_TABLE WHERE MY_ID='X' ")

//convert from DD-MM-YYYY to YYYY-MM-DD:
if (!empty($result)) {
    $myDate = $result[1]['MY_DATE'];
    if (!empty($myDate)) {
        $a = explode('-', $myDate);
        @@myDateInForm = $a[2].'-'.$a[1].'-'.$a[0] 
   }
}

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]