Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting VFP date type to SQL SmallDateTime
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01038556
Message ID:
01038592
Vues:
19
>>>>>>
>>>>>
>>>>>It means that date is out of the allowed range: from January 1, 1753 through December 31, 9999.
>>>>
>>>>I don't think I have dates outside this range. Most likely, either my table is corrupted or the date is empty. I will check all fields.
>>>
>>>An empty date is outside of the range.
>>
>>My SQL Server smalldatetime field allows NULLs. Do you know if I set value to ".NULL." it will work (for those records where date is empty)?
>
>Yes, it should.

But for some reason I am getting the syntax error. Here is my code:
IF empty(tapcomp.fdate) or tapcomp.fdate < ctod("01/01/1753") or ;
   tapcomp.fdate > ctod("12/31/9999")
   lFdate = ".NULL."
ELSE
   lFdate = DTOC(tapcomp.fdate)
ENDIF
Do you see anything that I might be missing?

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform