DateTime
(Created page with "Creating a datetime for a specific date use DateTime.Parse('2020-01-01')")
 
No edit summary
Line 1: Line 1:
Creating a datetime for a specific date use
Creating a datetime for a specific date use
  DateTime.Parse('2020-01-01')
  DateTime.Parse('2020-01-01')
or
DateTime.Create(2020, 1, 1)
===== Empty DateTime that is not nullable =====
A DateTime that is not nullable, i.e. not a DateTime? without a date, what value does it have.
You can create a value using, which will be a empty
DateTime.Create(1, 1, 1)
You can also compare an empty DateTime value with this empty DateTime value like this;
vDateTimeValue = DateTime.Create(1, 1, 1)
Will return true for an empty but not nullable DateTime variable

Revision as of 22:53, 23 November 2022

Creating a datetime for a specific date use

DateTime.Parse('2020-01-01')

or

DateTime.Create(2020, 1, 1)
Empty DateTime that is not nullable

A DateTime that is not nullable, i.e. not a DateTime? without a date, what value does it have.

You can create a value using, which will be a empty

DateTime.Create(1, 1, 1)

You can also compare an empty DateTime value with this empty DateTime value like this;

vDateTimeValue = DateTime.Create(1, 1, 1) 

Will return true for an empty but not nullable DateTime variable

This page was edited 84 days ago on 02/10/2024. What links here