Hi,
I Need Your Help
Write in Excel Present and Absent based on calander if sunday mention A otherwise B. if month only 30days 31 mention -.
Thank you
Hi,
I Need Your Help
Write in Excel Present and Absent based on calander if sunday mention A otherwise B. if month only 30days 31 mention -.
Thank you
Hi @MD_Farhan1
Could you be more specific…?
Hi @MD_Farhan1
Use below code in Invoke Code:
' Get the current date and determine the present month
Dim currentDate As DateTime = DateTime.Now
Dim presentMonth As Integer = currentDate.Month
Dim presentYear As Integer = currentDate.Year
' Get the number of days in the present month
Dim daysInMonth As Integer = DateTime.DaysInMonth(presentYear, presentMonth)
' Create a DataTable
dt = New DataTable()
dt.Columns.Add("Date", GetType(Integer))
dt.Columns.Add("Status", GetType(String))
' Populate the DataTable with dates and corresponding statuses
For day As Integer = 1 To daysInMonth
Dim dateValue As New DateTime(presentYear, presentMonth, day)
Dim status As String = If(dateValue.DayOfWeek = DayOfWeek.Sunday, "A", "P")
dt.Rows.Add(dateValue.Day, status)
Next
Invoked Arguments:
Check the below workflow:
Sequence19.xaml (12.4 KB)
Hope it helps!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.