RE: [aus-dotnet] #12:00:00 AM# ..is date


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Hungerford, Martin (Contractor)
    • Subject: RE: [aus-dotnet] #12:00:00 AM# ..is date
    • Date: Thu, 02 Dec 2004 13:14:35 +1100

    Tim    Your info is correct for England.  In Russia, IIRC, the days were removed in 1917.   Martin
    -----Original Message-----
    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx]On Behalf Of Tim Wilson
    Sent: Thursday, 2 December 2004 1:15 PM
    To: 'dotnet@xxxxxxxxxxx'
    Subject: RE: [aus-dotnet] #12:00:00 AM# ..is date

    By the way, do people know why SQL Server uses 1753?   About 8 years ago I was doing some SCO System admin, when I stumbled across some interesting information reading through the "MAN" command (online manual) pages, looking for information about date-related commands. It's interesting to note that in September 1752, 11 days were subtracted from that month in Gregorian calendar (the one used by western society today). Interestingly SCO Unix displayed a calendar for that month - with exactly 11 days missing.   Curious about the details of the calendar change, do a search for words "gregorian","1752" and "semptember". eg... http://www.ancestry.com/learn/library/article.aspx?article=3358   .Net uses the same method as SQL for controls DateTimePicker and MonthCalendar - you cant display it because of a curious mindate. Not much of a problem for most applications.   Tim.
    -----Original Message-----
    From: anthony [mailto:list@xxxxxxxxxxxxxxx]
    Sent: Thursday, 18 November 2004 10:57 PM
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] #12:00:00 AM# ..is date

    thanks

    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] On Behalf Of Andrew de la Harpe
    Sent: Thursday, 18 November 2004 10:02 PM
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] #12:00:00 AM# ..is date

    A date always has a value. Date dt = new Date() = 00:00:00.0000000, January 1, 0001 Your problem is that this is probably less than the allowed value for your datatype. eg SQL Server datetime type has a min value of  January 1, 1753 .   Usually it's best to insert a null for unassigned dates. ie. if ( dt > DateTime.MinValue)         set param here... Andrew
    -----Original Message-----
    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx]On Behalf Of anthony
    Sent: Thursday, November 18, 2004 9:55 PM
    To: dotnet@xxxxxxxxxxx
    Subject: [aus-dotnet] #12:00:00 AM# ..is date

    I have property defined as datetime...when i read the property wihout any assignment the value is #12:00:00 AM#   if i use isdate..it returns TRUE but this will not submit to SQL...How do i detect a valid datetime for SQL?     Anthony



    (Click here for more information on the aus-dotnet mailling list)