Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding .Net DateTime to Foxpro date field
Message
De
12/02/2008 15:10:12
 
 
À
12/02/2008 14:51:58
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01291937
Message ID:
01291949
Vues:
14
Tim,

How about using Parameters? That *should* work ... (caveat: I haven't done any Fox w/ .NET, so take it with a grain of salt <g>)

~~Bonnie



>Ok I know I have been away from foxpro for awhile now and we still have a few fox tables around we use. I need to add a row to a fox table that contains a date. I am using a simple Insert command. Problem is the dot net DateTime structure is so different. Is there a way to change the format of get a format in C# Dot net that allows me to insert or update a fox table?
>
>DateTime myDate = DateTime.Now;
>Looks like 2/12/2008 11:35:44AM
>
>fox expects a date to look like this {^yyyy-mm-dd, hh:mm:ssa}
>I could parse this all out with a bunch of conversions but what a pain
>
>string foxDate = "{"
>foxDate += myDate.Year.ToString();
>foxDate += myDate.Month.ToString();
>etc. but this also would not quite conform since the month is 2 and would convert to "2" and not "02"
>
>Ideas welcome.
>Thanks
>Tim
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform