Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set century
Message
 
 
À
12/05/2005 09:19:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01013353
Message ID:
01013360
Vues:
16
Malcolm,

If you think I don't know how to read and use Help, you're mistaken. However, I have problems comprehending and implementing what I've read.

Try this:
set century to
for i=40 to 60
  =messagebox(ctod('01/01/'+ transform(m.i)))
next
Also I tried various combinations of this command and could not make it work.


>Nadya,
>
>Does SET CENTURY ... command help?
>
>Snippet from VFP 9 help on this command follows my signature.
>
>Malcolm
>
>[quote]
>
>Determines whether Microsoft Visual FoxPro displays the century portion of date expressions and how Visual FoxPro interprets dates that specify only 2 digit years.
>
>SET CENTURY ON | OFF | TO [nCentury [ROLLOVER nYear]]
>
>ON
>Specifies a four-digit year in a format that includes 10 characters (including date delimiters). Note: To provide year 2000 compliance, it's recommended that you always set SET CENTURY to ON.
>
>OFF (Default)
>Specifies a two-digit year in a format that includes eight characters and assumes the twentieth century for date calculations.
>
>TO nCentury
>A number from 1 to 99 that specifies the current century. When a date has a two digit year, nCentury determines in which century the year occurs. The ROLLOVER value determines whether the year is in nCentury or the century following nCentury.
>
>ROLLOVER nYear
>A number from 0 to 99 that specifies the year equal to and above which is the current century and below which is the next century. The default value for nYear is the last two digits of the current year plus 50 years - if the current year is 1998, nYear is 48, the last two digits of 2048 (1998 + 50). Note that the rollover value only determines the century for a date entered without a century portion - an ambiguous date format that is not recommended. For example, if the current year is 1998 and nYear is the default (48), any date entered without a century portion and a year of 48 or greater is considered to be in the current century (the 20th century). Any date entered without a century portion but with a year before 48 is considered to be in the next century (the 21st century).
>
>[/quote]
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform