Automic Workload Automation

 View Only
  • 1.  Cannot pass a date

    Posted Feb 07, 2020 11:06 AM
    I'm trying to pass today's date to a PS job, and the format is exactly what I need it to be (MM/DD/YYYY) when I run only this: 
    :SET &TODAY# = &$PHYS_DATE_MM_DD_YYYY_s#
    :PRINT &TODAY#

    This is a screen shot from PS displaying the required date format:


    So, I'm not clear on why it's giving me the following error when the date format is correct. Any ideas?  

    2020-02-07 10:11:24 - U00020206 Variable '&COMPANY#' was stored with value 'XXX'.
    2020-02-07 10:11:24 - U00020408 02/07/2020
    2020-02-07 10:11:24 - U00020408 XXX
    2020-02-07 10:11:24 - U00020408 XXX
    2020-02-07 10:11:23 - U02000005 Job 'JOBS.PS.XXX' with RunID '40671700' started.
    2020-02-07 10:11:23 - U02004018 The job was successfully interpreted.
    2020-02-07 10:11:24 PS_MODIFY_RUNCONTROL RUNCONTROLID=XXXL,RECORDNAME=XXX,FIELDNAME=ASOFDATE,FIELDVALUE=02/07/2020
    2020-02-07 10:11:24 The given value is not a valid date value or it is not in the format YYYYMMDD!
    2020-02-07 10:11:24 - U02004025 Job-script execution was aborted.


  • 2.  RE: Cannot pass a date

    Posted Feb 07, 2020 11:23 AM
    This seems to be a Peoplesoft restriction to me.  The examples in this help document also show specifying a date in YYYYMMDD format.   Suggest you try &$PHYS_DATE_YYYYMMDD#.  

    https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.3/Automic%20Automation%20Guides/help.htm#Script/Reference/PS_MODIFY_RUNCONTROL.htm?Highlight=modify_runcontrol

    ------------------------------
    Pete
    ------------------------------



  • 3.  RE: Cannot pass a date

    Posted Feb 07, 2020 01:51 PM
    You were absolutely right. It doesn't make sense to me, but PS accepted it with a simple SYS_DATE("YYYYMMDD"). 

    Thanks, Pete!


  • 4.  RE: Cannot pass a date
    Best Answer

    Broadcom Employee
    Posted Feb 10, 2020 02:58 AM
    Hi,
    the internal date format is always YYYYMMDD. The format DD/MM/YYYY is configured as display setting in your system and can also be configured to be displayed in another format to the end user (depending on your country).
    Regards, Markus