RE: DATE ENTRY PROBLEM.
From: Ken Blum
Illinois - United States
To: George Mortimer
Pennsylvania - United States
Date entry problem.
RE: Date entry problem.
Visual FoxPro 6
Wednesday, April 30, 2003 6:10:51 PM
This message was rated by:
> I'm trying to permit entry of a full date in mm/dd/yyyy format using a VFP form. In my procedure I have included the following statements: SET DATE AMERICAN, SET CENTURY ON. Browsing the database shows the full date in mm/dd/yyyy format. However, I can only enter a 2-digit year in the form. Also, I'd like to have this date changed to the system date automatically whenever a record is updated. I'm using VFP v6.0, Svc Pack 4. Can anyone help?
Your Form is probably set to a Private Data Session...
On the Load Event of the form, try setting SET CENTURY ON
From Help: SET CENTURY is scoped to the current data session. New data sessions are initialized to the default values as specified above, ignoring the value of SET CENTURY for the current data session.
To have data chenged when a record is updated you would set the Update Trigger of the table in the database. See help under "Triggers".