Automate

 View Only
  • 1.  Transform / Date Issue

    Posted 02-06-2020 10:12

    In a script I am working on, I have set up a transform on a cell to be "today minus one":  =Today()-1

     

    In the new cell (I verified that that column is set to the date format I want) the date on the excel spread sheet comes back correctly in a date format; i.e. 2/5/2020 (the format I use in many of my scripts and that is accepted by SAP) but when I debug I can see that the transformed date is reverting to a number format; i.e. 43866 and my script is failing. 

     

    The upload works just fine when I just put the "day minus one" formula directly in excel.

     

    Any suggestions would be greatly appreciated.

     

    Rgds,

    Rita

     

     

    Rita Schoeppe

    Business Process Analyst, Quote to Cash

    D 616 393 3124 | M 616 340-1988

     

    One Haworth Center, Holland, MI 49423-9576 USA

    616 393 3000

    haworth.com

    signature_1345850550

    Follow us @haworthinc

     

    signature_220145100

     

    Confidentiality Notice: This email message and its attachments may contain confidential information. If you received this message in error, please delete it as soon as possible and alert the sender.

     



  • 2.  RE: Transform / Date Issue

    Employee
    Posted 02-07-2020 09:37
    Hi Rita - since I don't see your script or a tcode, I can only answer in general terms.  That should work if  you script records a date field as a date.

    Make sure if you're in Studio that the column is considered a date, right click, choose formatting and number formatting and select date.  If not, it will continue to think it's a number, which seems to be the default in SpreadsheetGear - which is our Excel-like interface in Studio.


    Also, sometimes dates get recorded as a string, and then I use something like =TEXT(TODAY(),"mm/dd/yyyy")  - you could add the -1 making it =TEXT(TODAY()-1,"mm/dd/yyyy") 

    If it's a BAPI, sometimes the date format is picky, needing something like 02/02/2020 (the leading zeros needed), and sometimes it will only work with  yyyy-mm-dd.

    Hope that gives you a few ideas,
    Sigrid


    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------