Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrong Years
Message
 
 
À
22/07/2008 16:07:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01333160
Message ID:
01333314
Vues:
13
James,

You can post-process dates
TEXT TO lcStr NOSHOW
"Date","String","Int"
01/01/99,"String1", 15
12/25/98,"String2", 23
12/25/08,"String2", 31

ENDTEXT

STRTOFILE(lcStr, "temp.csv")

CREATE CURSOR Temp (fld1 D, fld2 C(30), Fld3 I)
APPEND FROM "temp.csv" CSV

lnCentury = SET("Century",1)
lnRollover = SET("Century",2)

UPDATE Temp ;
	SET fld1 = ICASE(YEAR(fld1) > 100, fld1, ;
		YEAR(fld1) >= lnRollover, GOMONTH(fld1,lnCentury*100*12), ;
		GOMONTH(fld1,(lnCentury+1)*100*12))


LOCATE
BROWSE NOWAIT
>
>Try running this...
>
>
>TEXT TO lcStr NOSHOW
>"Date","String","Int"
>01/01/99,"String1", 15
>12/25/98,"String2", 23
>
>ENDTEXT
>
>STRTOFILE(lcStr, "temp.csv")
>
>CREATE CURSOR Temp (fld1 D, fld2 C(30), Fld3 I)
>APPEND FROM "temp.csv" CSV
>LOCATE
>BROWSE NOWAIT
>
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform