Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date time conversion
Message
De
25/01/2005 04:01:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/01/2005 00:57:20
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
00980264
Message ID:
00980295
Vues:
53
>>>From a data set, if I have a record where a datetime field is empty, displaying this field with .ToString will give "30/12/1899 01:00:00". Is this normal?<
>>
>>No. Where is your data coming from?
>
>The data comes from a VFP table. Basically, some fields have empty values. We use OleDbDataAdapter to extract specific records from there. This is when we end up with such weird conversions.

Michel,
I think it's a result of OleDb specification:( ODBC behaves the same way. Set your datetime field to accept nulls and replace empty values with null or during getting data from VFP convert it to string in your SQL rather than using ToString() later.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform