Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting data
Message
From
03/12/1999 12:59:32
 
 
To
03/12/1999 12:44:06
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00298331
Message ID:
00298450
Views:
24
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform