IT Process Automation

  • 1.  Set a specific pattern for Date

    Posted Nov 04, 2016 09:02 AM

    Hello All. I have created a workflow which takes some values from Db and than prints those as a csv. My issue is , i am pulling the date and time value from the database in the format 19/11/2016 11:30:00 but when i am printing it in a file it is converted into Sat Nov 19 00:00:00 GMT-06:00 2016. I want the format as it is. Here i am using java script for all operations. Please help me in this issue.

     

    I am using CA ITPAM 4.2.2 with two orchestrators.



  • 2.  Re: Set a specific pattern for Date
    Best Answer

    Broadcom Employee
    Posted Nov 08, 2016 10:22 AM

    You have a couple of options:

     

    1. Use the PAM system function formatDate() to convert the date to a string in the format you want. Example: Process.datestring = formatDate(Process.testdate, 'MM/dd/yyyy HH:mm:ss')
    2. Use a function in your database to convert the date to a string in your query.  SQL Server uses the CONVERT function, Oracle has TO_STRING.  Example: SELECT TO_STRING(testdate, 'MM/dd/yyyy HH:mm:ss') datestring FROM your_table WHERE ... 


  • 3.  Re: Set a specific pattern for Date

    Posted Jan 31, 2017 10:10 AM

    Thank you so much Bill