Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set century
Message
From
12/05/2005 09:19:53
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01013353
Message ID:
01013355
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
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]
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform