Uipath list Of Mondays in year use case vb.net

Imports System

Public Module Module1

Public Sub Main()
    Dim year As Integer = 2023 ' Specify the year
    Dim dateValue As New DateTime(year, 1, 1) ' Start from the first day of the year

    ' Loop through all days of the year
    While dateValue.Year = year
        ' Check if the day is Monday
        If dateValue.DayOfWeek = DayOfWeek.Monday Then
            Console.WriteLine(dateValue.ToString("yyyy-MM-dd")) ' Print the date
        End If
        dateValue = dateValue.AddDays(1) ' Move to the next day
    End While

    Console.ReadLine() ' Wait for user input before closing the console window
End Sub

End Module

Imports System

Public Module Module1

Public Sub Main()
    Dim year As Integer = 2024 ' Specify the year
    Dim dateValue As New DateTime(year, 1, 1) ' Start from the first day of the year

    ' Loop through all days of the year
    While dateValue.Year = year
        ' Check if the day is Monday
        If dateValue.DayOfWeek = DayOfWeek.Monday Then
            Console.WriteLine(dateValue.ToString("yyyy-MM-dd")) ' Print the date
        End If
        dateValue = dateValue.AddDays(1) ' Move to the next day
    End While

    Console.ReadLine() ' Wait for user input before closing the console window
End Sub

End Module

Hi @Ali_Shaik

Check the blow thread

Hi @Ali_Shaik

Check the below workflow to get all the monday dates in a year,

Hope it helps!!