Skip to Content
ADO.NET in a Nutshell
book

ADO.NET in a Nutshell

by Matthew MacDonald, Bill Hamilton
April 2003
Beginner to intermediate
620 pages
21h 48m
English
O'Reilly Media, Inc.
Content preview from ADO.NET in a Nutshell

Name

SqlDateTime

Synopsis

A structure that represents a date and time that can range in value from January 1, 1753 to December 31, 9999, with an accuracy of 3.33 milliseconds. This maps directly to the SQL Server datetime data type. It can also be used for the smalldatetime data type, which can store a date and time from January 1, 1900 to June 6, 2079 with an accuracy of one minute.

public struct SqlDateTime : INullable, IComparable {

// Public Constructors

   public SqlDateTime(DateTime value);  

   public SqlDateTime(int dayTicks, int timeTicks);  

   public SqlDateTime(int year, int month, int day);  

   public SqlDateTime(int year, int month, int day, int hour, int minute, int second);

   public SqlDateTime(int year, int month, int day, int hour, int minute, int second, double millisecond);

   public SqlDateTime(int year, int month, int day, int hour,  int minute, int second, int bilisecond);

// Public Static Fields

   public static readonly SqlDateTime MaxValue;                // =12/31/9999 11:59:59 PM

   public static readonly SqlDateTime MinValue;                // =1/1/1753 12:00:00 AM

   public static readonly SqlDateTime Null;                    // =Null

   public static readonly int SQLTicksPerHour;                 // =1080000

   public static readonly int SQLTicksPerMinute;               // =18000

   public static readonly int SQLTicksPerSecond;               // =300

                  // Public Instance Properties

   public int DayTicks{get; } 

   public bool IsNull{get; }                                   // implements INullable

   public int TimeTicks{get; } 

   public DateTime Value{get; } 

// Public Static Methods

   public static SqlBoolean Equals(SqlDateTime x, SqlDateTime ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

C# 7.0 in a Nutshell

C# 7.0 in a Nutshell

Joseph Albahari, Ben Albahari
ADO.NET Cookbook

ADO.NET Cookbook

Bill Hamilton

Publisher Resources

ISBN: 0596003617Errata Page