ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   please explain (https://www.excelbanter.com/excel-programming/427800-re-please-explain.html)

Jim Thomlinson

please explain
 
Try this...

dayofweek = Format(30 - 4 - 2009, "Dddd")
--
HTH...

Jim Thomlinson


"sunilpatel" wrote:

dayofweek = WeekdayName(Weekday(30 - 04 - 2009))

why is Friday returned not Thursday.




Dave Peterson

please explain
 
I think that's a coincidence:

msgbox format(5 - 1 - 2009, "dddd")
returns
Wednesday



Jim Thomlinson wrote:

Try this...

dayofweek = Format(30 - 4 - 2009, "Dddd")
--
HTH...

Jim Thomlinson

"sunilpatel" wrote:

dayofweek = WeekdayName(Weekday(30 - 04 - 2009))

why is Friday returned not Thursday.




--

Dave Peterson


All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com