I want today date

hi
i want today date… but if my bot is running on saturday or sunday i want next working day…

can anyone send me the xaml

Hi @katta_nikhil

You can use the below expression to get the today’s date.

- Assign -> TodayDate = System.now.datetime.toString(dd-MM-yyyy)

Hope it helps!!

yeah i know this one … but i have a condition if today is saturday and sunday ,… i need to put monday

Hi @katta_nikhil

  1. Sequence
    2. Assign
    - Variables:
    - currentDate: DateTime = DateTime.Now
    3. Assign
    - Variables:
    - dayOfWeek: Int32 = CInt(currentDate.DayOfWeek)
    4. If
    - Condition: dayOfWeek = 6 Or dayOfWeek = 0 (Saturday or Sunday)
    5. Switch
    - Expression: dayOfWeek
    6. Case 6
    7. Assign
    - Variables:
    - nextWorkingDay: DateTime = currentDate.AddDays(2)
    8. Case 0
    9. Assign
    - Variables:
    - nextWorkingDay: DateTime = currentDate.AddDays(1)
    10. Default
    11. Assign
    - Variables:
    - nextWorkingDay: DateTime = currentDate

Hope it helps!!

please can u share the xaml file… pleaseee

what variable is output here

@katta_nikhil

Updated file is here with the expected output
BlankProcess3.zip (335.2 KB)

Hope it helps!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.