Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date format
Message
De
29/12/2012 17:14:35
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Date format
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01560885
Message ID:
01560885
Vues:
62
In my code, before executing a script, I have this verification:
        ' If the date is not valid
        If Not oApp.EmptyDate(tdDate) And tdDate < New Date(1927, 1, 1) Then
            Return False
        End If
The script starts like this:
DECLARE @ModUser Int
DECLARE @ModDate DateTime
DECLARE @InspectionDate DateTime
DECLARE @Numero Int

SET @ModUser=1
SET @ModDate='2012-12-17 10:30:15'
SET @InspectionDate='1-01-01 00:00:00'
SET @Numero=60443
However, in the .NET code, the tdDate did not go into the condition. So, it saw it as ok. My condition is to make sure the date is not empty and smaller than 1927. But, when we look at the script, it says 1-01-01 00:00:00. So, is this possible SQL Server sees that as 2001?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform