Robotic Process Automation (RPA)

 View Only
  • 1.  day of the week

    Posted Tue June 11, 2024 09:22 AM

    Hi, from a date you can get the day, month, year, hour, but not the day of the week, is there any way to get it?

    Regards



    ------------------------------
    Miguel Angel Sanchez Sandoval
    ------------------------------


  • 2.  RE: day of the week

    Posted Wed June 12, 2024 05:01 AM
    Edited by Alexander Krastev Wed June 12, 2024 05:40 AM

    Hi Miguel,

    I use follow code to extract the day of the week:

    defVar --name dToday --type DateTime
    defVar --name sPreviousWorkingDayName --type String
    defVar --name sToday --type String
    defVar --name sDayName --type String
    getCurrentDateAndTime --localorutc "LocalTime" dToday=value
    dateTimeToText --culture "en-US" --date "${dToday}" --standardformat "LongDate" sToday=value
    getRegex --text "${sToday}" --regexPattern "(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" --regexOptions "0" sDayName=value
    logMessage --message "${sDayName}" --type "Info"



    ------------------------------
    [Alexander] [Krastev]
    [RPA developer]

    ------------------------------



  • 3.  RE: day of the week

    Posted Wed June 12, 2024 12:34 PM

    Hi Alexander, thanks for the answer, I implement it.

    Regards



    ------------------------------
    Miguel Angel Sanchez Sandoval
    ------------------------------