Lesson 15: Impressive C# Date/Time Handling

Опубликовано: 29 Октябрь 2024
на канале: Paul D. Sheriff
32
0

Lesson 15: Impressive C# Date/Time Handling

There are so many ways to work with dates and times within C#. This lesson shows you a variety of ways you can perform arithmetic and format dates and times.

The following Date/Time methods are covered in this lesson.
Date,Day,DayOfWeek,DayOfYear,Month,Year,Hour,Minute,Second,Millisecond,Kind,Ticks,TimeOfDay
ToString(),AddDays(),AddHours(),IsDaylightSavingTime(),ToLocalTime(),ToUniversalTime(),ToLongDateString(),ToLongTimeString(),ToShortDateString(),ToShortTimeString()
GetDateTimeFormats(),ToString("d"),ToString("f"),ToString("F"),GetDateTimeFormats('D'),ToString("MMMM dd, yyyy"),ToString("yyyy-dd-mm")
FromDateTime()

Content
DEMO: DateTime Properties 00:00
DEMO: DateTime Methods and Formatting 01:21
DEMO: DateTime Standard and Custom Formats 03:19
DEMO: Using the DateOnly 08:17
DEMO: Using the TimeOnly Properties/Methods 08:17
Lesson Summary 08:57

You can get all the samples and hands-on labs for this course at https://www.pdsa.com/YouTube.

Microsoft date and time format strings https://bit.ly/3ROQRZ3

#datetime #datemanipulation #programming #csharp #dotnet #dotnetcore #dotnet6 #dotnet7 #dotnet8 #pauldsheriff #pluralsight #youtube

Paul.About()
Hello, my name is Paul D. Sheriff and I have a passion for teaching. I have been training developers for over 35 years through books, videos, article, blog posts, and international conferences and user groups.

Paul.Contact()
Website: https://www.pdsa.com
Email: [email protected]
LinkedIn:   / paulsheriff  
Blog: https://blogs.pdsa.com/
Pluralsight: https://app.pluralsight.com/profile/a...
YouTube Channel: @pauldsheriff