HOW TO CHECK A GIVEN DATE IS DST DATE OR NOT USING C#?

Takeshi Okada

Total Post:89

Points:629
Posted by  Takeshi Okada
C# 
C#
 1745  View(s)
Ratings:
Rate this:

C# has provided a way for entered data is DST date or not? I want to implement in my demo project how can I use it?

  1. Royce Roy

    Post:149

    Points:1043
    Re: How to check a given date is DST date or not using C#?

    You provide a year and it will return a DaylightTime object, which contains the start and end dates for daylight saving. You can then compare your date against those two to determine if its a DLS date or not. Whilst this answer has been accepted, please see Matt Johnson's answer below for details why it's not the best answer and why the TimeZoneInfo class should be used instead.


    Follow This Link to resolve your problem.

      Modified On Apr-05-2016 03:31:28 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!