Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Deal with Numeric Date Fields in SPT
Message
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:
01315171
Vues:
20
This message has been marked as the solution to the initial question of the thread.
Or simpler
* VFP9
CAST(DTOS(dDate) AS int)
* Pre VFP9
INT(VAL(DTOS(dDate)))
>
>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
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform