开发者

Wrong firstdayofweek set in VB.NET

开发者 https://www.devze.com 2023-02-13 11:26 出处:网络
Hey on a server I am working on I am getting the wrong week day for the current day i.e today Response.Write(WeekdayName(Weekday(System.DateTime.Now)))

Hey on a server I am working on I am getting the wrong week day for the current day i.e today

Response.Write(WeekdayName(Weekday(System.DateTime.Now)))

I am getting Thursday, where does this default get se开发者_开发技巧t or where can I change it. And it thinks day of the week is 4.

Thanks


The resolution of this property depends on the system timer. If you adjust the server's system time, it should adjust the programs.


It might have to do with the default start of the week. You might try something like:

Response.Write(WeekdayName(Weekday(System.DateTime.Now, _
    Microsoft.VisualBasic.FirstDayOfWeek.Sunday)))
0

精彩评论

暂无评论...
验证码 换一张
取 消