Extract days from each dates in a datetime array

I have an array DateList = {New DateTime(2018, 01, 01),New DateTime(2018, 01, 15),New DateTime(2018, 02, 09), New DateTime(2018, 05, 28), New DateTime(2018, 07, 04)}
how do i get each day e.g wednesday, thursday, friday etc from each of the dates. I get the error "allows strict on disallows implicit conversions from string to integer.

Hi @Olaoluwa,

I hope you created the array(object)
If yes need to use this code
string dayname=convert.TodateTime(DateList(0)).ToString("dddd")

If you created array(DateTime)

If yes need to use this code
string dayname=DateList(0).ToString("dddd")

Use for each in the for each -> type need to mention as DateTime


thats exactly what i have been doing but im still getting the error… company holidays is the datetime array. i attached a screenshot to see.

Can you share your xaml file I ll check and update you

Main.xaml (7.7 KB)

HI @Olaoluwa,

Use this xaml file

Main (17).xaml (7.8 KB)


the files look the same what did i do wrong?

oh i see my mistake now. Thank you.

You can get directly the day by using