Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Deal with Numeric Date Fields in SPT
Message
 
À
05/05/2008 14:48:29
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01315165
Message ID:
01315167
Vues:
17
>I am trying to write a SPT that will retreive a set of records between two dates. The remote data base fields are numeric(20080505) for example. What does my SPT need to be for say records > 01/01/2007 and < 01/05/2008?


where field > 20070101 and field < 20080105
PROCEDURE DTONUM()
	LPARAMETERS dDate
	LOCAL cDate
	IF !EMPTY(m.dDate)
		m.cDate = STR(YEAR(dDate),4,0) + PADL(ALLTRIM(STR(MONTH(m.dDate))),2,"0") + PADL(ALLTRIM(STR(day(m.dDate))),2,"0")
	ELSE
		m.cDate = "00000000"
	ENDIF
	RETURN VAL(m.cDate)
	
ENDPROC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform