Customer Portal

Comments 1

  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hello,

    You can convert your strings to date and then back to string in another format. Something like:
    $out.0.my_date = date2str(str2date("01/01/1970", "dd/MM/yyyy"), "dd-MMM-yy");

    And what exactly do you mean by the second question? Would you like to replace any incomplete date with NULL value? If so, I recommend parsing the string and testing whether it contains everything necessary (using common if conditions).

    Kind regards,

Please sign in to leave a comment.