Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting data
Message
De
03/12/1999 12:59:32
 
 
À
03/12/1999 12:44:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00298331
Message ID:
00298450
Vues:
23
Andrews,

Porque no me digas esta a primer? Traes esto:
SET CENTURY ON TO 19 ROLLOVER 50  && Cambias el ano si quieres
cMonths=" JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"
SELECT mov
SCAN
   nBracket1=AT("/",mov.charDate)
   nBracket2=AT("/",mov.charDate,2)
   cThisDay=LEFT(mov.charDate,nBracket1-1)
   cThisYear=RIGHT(mov.charDate,LEN(ALLT(mov.charDate))-nBracket2)
   cThisMonth=UPPER(SUBSTR(mov.charDate,nBracket1+1,nBracket2-(nBracket1+1)))
   cThisMonth=PADL(INT((AT(cThisMonth,cMonths)-1)/3)+1,"0",2)
   REPLACE mov.TgtDate WITH CTOD(cThisMonth+"/"+cThisDay+"/"+cThisYear)
ENDSCAN
>Si tu tienes razón, pero estoy utilizando para cada mes las tres primeras letras, es decir, Enero=Ene, Febrero= Feb.....
>Otra cosa esto funciona cuando el año es en formato de 4 dígitos, pero el año que estoy usando es en dos dígitos.
>
>Yes you right, but I´m using for each month the first three letters, I mean, January=Jan, Febrary=Feb....
>Other thing this work (your code) when the yaer is in 4 numbers, but I´m using 2 numbers.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform