Home > DeveloperSection > Forums > How to check a given date is DST date or not using C#?
Takeshi Okada
Takeshi Okada

Total Post:89

Points:629
Posted on    October-22-2013 3:46 AM

 C# C# 
Ratings:


 1 Reply(s)
 1305  View(s)
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?



Royce Roy
Royce Roy

Total Post:134

Points:938
Posted on    October-22-2013 4:05 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick