Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
C# Tutorial
Date Time 74 codes
Home
C# Tutorial
Date Time
1 Add seconds to current time
2 Benchmark Timing with DateTime
3 Call GetDaysInMonth for the second month in each of five years in each era
4 Check the current second
5 Create a DateTime instance, specifying the number of ticks
6 Create a DateTime instance, specifying the year, month, and day
7 Create a DateTime instance, specifying the year, month, day, and JulianCalendar object
8 Create a DateTime instance, specifying the year, month, day, hour, minute, second, and millisecond
9 Create a DateTime with the current date and time
10 Create a TimeSpan instance, and add it to DateTime
11 Create a TimeSpan instance, specifying the days, hours, minutes, seconds, and milliseconds
12 Create a TimeSpan instance, specifying the days, hours, minutes,and seconds
13 Create a TimeSpan instance, specifying the hours, minutes, and seconds
14 Create a TimeSpan instance, specifying the number of ticks
15 Create a TimeSpan representing 1 week
16 Create a TimeSpan representing 1 week and subtract from a DataTime
17 Create a TimeSpan representing 2 5 days
18 Creates and initializes a JulianCalendar
19 Creating specific datetimes
20 Culture-insensitive DateTime format strings
21 Culture-sensitive DateTime format strings
22 DateTime custime format
23 DateTime Formatting
24 DateTime long date pattern
25 DateTime Parse
26 DateTime Parse and DateTime Kind
27 DateTime ParseExact
28 Display the Date, Day, DayOfWeek, DayOfYear, Ticks, and TimeOfDayProperties of DateTime
29 Display the properties for myTimeSpan
30 Displays the value of the CurrentEra property with GregorianCalendar CurrentEra
31 Extracting the current datetime
32 For each calendar, displays the current year, the number of months in that year, and the number of days in each month of that ye
33 Format DateTime for different CultureInfo
34 Format DateTime with %M
35 Format DayOfWeek
36 Format time and date
37 Format time and date information
38 Get current time
39 Gets the Calendar instance associated with a CultureInfo
40 GetWeekOfYear varies depending on the FirstDayOfWeek and the CalendarWeekRule used
41 IsLeapMonth() for KoreanCalendar
42 Manual Profiler
43 Measures the time taken to add some numbers
44 Parse a date with CultureInfo
45 Parse string with date but no time component
46 Pre-built datetime specifiers
47 Samples JulianCalendar
48 Samples ThaiBuddhistCalendar
49 TimeSpan calculation
50 Use standard en-US date and time value to do Date time parse
51 Use Stopwatch
52 Use the Add() method to add a TimeSpan instance to another
53 Use the Add() method to add a TimeSpan to a DateTime
54 Use the AddYears(), AddMonths(), AddDays(), AddMinutes(), and AddSeconds() methods to add periods to a DateTime
55 Use the Compare() method to compare DateTime instances
56 Use the DaysInMonth() method to retrieve the number of days in a particular month and year
57 Use the Duration() method to add two TimeSpan instances
58 Use the Equals() method to compare DateTime instances
59 Use the FromDays(), FromHours(), FromMinutes(), FromSeconds(), FromMilliseconds(), and FromTicks() methods to create new TimeSpa
60 Use the FromFileTime() method to convertan operating system file timestamp to a DateTime
61 Use the IsLeapYear() method to determine if a particular year is a leap year
62 Use the Negate() method to add two TimeSpan instances
63 Use the Now and UtcNow properties to get the currrent date and time
64 Use the overloaded addition operator (+) to add a TimeSpan to a DateTime
65 Use the overloaded less than operator () to compare two DateTime instances
66 Use the overloaded subtraction operator (-) to subtract a TimeSpan from a DateTime
67 Use the Parse() method to convert strings to DateTime instances
68 Use the Parse() method to convert strings to TimeSpan instances
69 Use the Subtract() method to subtract a TimeSpan from a DateTime
70 Use the Subtract() method to subtract a TimeSpan instance from another
71 Use the ToFileTime() method to convert a DateTime to an operating system file timestamp
72 Use the ToLongDateString() and ToShortDateString() methods to convert the date parts of a DateTime to long and short date string
73 Use the ToLongTimeString() and ToShortTimeString() methods to convert the time parts of a DateTime to long and short time string
74 Use the ToString() method to convert a DateTime to a string