Blue Prism University

last person joined: 6 hours ago 

Discuss and learn more about Blue Prism University and certification.
Expand all | Collapse all

Convert text to date

  • 1.  Convert text to date

    Posted 06-21-2020 20:43

    Appreciate your guidance on conversion as I am getting an error when attempting to convert date in text value to date. 

    I use a following expression in calculation stage to convert text value and store it in new data stage with date data type:

    FormatDate(ToDate ([Departing date]), "dd/MM/yyyy")

    20/07/2020 text value is stored in data stage named "Departing date". 

    Can't seem to understand why I am getting an error message of "Unable to convert supplied value to a date: Text value "20/07/2020" cannot be interpreted as a date. 

    Expression appears valid.



    ------------------------------
    Sam
    ------------------------------


  • 2.  RE: Convert text to date

    Posted 06-24-2020 10:40
    Hi Sam,

    I think I was able to reproduce the error as you have described it.

    When you create the text data item, don't use punctuation/quotation marks when entering the value. Removing the punctuation should resolve the error.

    ------------------------------
    Patrick Aucoin
    Senior Product Consultant
    Blue Prism
    ------------------------------



  • 3.  RE: Convert text to date

    Posted 06-25-2020 05:07
    Hey Sam,

    check your system date. Likely your non-UK based date format is causing the issue. The issue being a month with that date doesn't exist. Try going into either your system settings and changing how your dates are interpreted or going into your quotes file and changing how the dates are generated to match your date formats. If you switch the date around im sure you'll notice it suddenly works i.e. from 20/07/2020 to 07/20/2020.

    ------------------------------
    Dexter Whelan
    Senior Developer/Mentor
    SAS
    Europe/LondonDexter Whelan
    Senior Developer/Mentor
    SAS
    Europe/London
    ------------------------------