How to get WeekDay for a Given "dd.MM.YYYY"?


How to get WeekDay for a Given “dd.MM.YYYY” ? Thx

1 Like

Assuming it’s a string, you first convert to a datetime variable, then you use the .DayOfWeek property DateTime.DayOfWeek Property (System) | Microsoft Learn

So if you wanted to return it back as a string it’d be something like this: Datetime.ParseExact(YourDateAsStringVariable,"dd.MM.yyyy",System.Globalization.CultureInfo.InvariantCulture).DayOfWeek.ToString

EDIT: Forgot to add in the cultureinfo portion for datetime.parseexact



1 Like

@HareeshMR, Thanks for reply but this will return only today, but I want an arbitrary day dd.MM.YYYY.Thx

Yeah, above solution by @Dave will work :slight_smile:


YES it’s working, but still returns some errors, Could you please help? I have attached related files.Dates.xlsx (8.9 KB) Sequence.xaml (9.9 KB)
Strange!!!It’s recording in column B until today only !!!

I fixed issue by removing Globalization from Datetime.ParseExact(YourDateAsStringVariable,"dd.MM.yyyy",System.Globalization.CultureInfo.InvariantCulture).DayOfWeek.ToString

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