DateTime計算につきクイックに教えてください。
メッセージボックスアクティビティで今日の曜日を表示するには
DateTime.Now.DayOfWeek.ToString
と書けば良いことは理解していますが、メッセージボックスアクティビティで特定の日付"26/02/2023"の曜日を表示するにはどう書けば良いでしょうか?
こんにちは
dd/MM/yyyy形式なのでDateTime.ParseExactメソッドを使います。
DateTime.ParseExact("26/02/2023","dd/MM/yyyy",System.Globalization.CultureInfo.InvariantCulture).DayOfWeek.ToString
Hey @gorby,
You can use now.tostring(“dd/MM/yyyy”) to get todays date
DateTime.ParseExact(now.tostring(“dd/MM/yyyy”),“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).DayOfWeek.ToString
This will give you todays day of the week
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.