Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get a Date String out of DateTime String
Message
De
03/02/2005 11:09:32
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00983438
Message ID:
00983497
Vues:
24
Hi, Dmitry,

>You are right. What I was missing is that you can get the VFP data to the .NET DateTime type by casting (I think this is the right term). Once your data is in DateTime type there are many ways to manipulate it.

Actually, FoxPro Dates are just translated into .NET DateTime type through the DataReader or DataTable. I think that where you're getting a bit off track is thinking that
drWORK_HIS["date_clos"]
is a DateTime or Date. It's actually neither. By itself, it's just a plain old object.

Also, keep in mind you can use the following:
Convert.ToDateTime(drWORK_HIS["date_clos"])
>Thank you for your suggestion.

Hope it works for you. In case you haven't already noticed, .NET doesn't have any idea about empty dates, unfortunately. So, empty dates come across as 12/30/1899, which is quite a bother. I don't understand why it at least couldn't come in as DateTime.MinValue, but that's how it is.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform