Link to home
Start Free TrialLog in
Avatar of northstar
northstar

asked on

4-digit date

In trying to comply with Y2K, I have set my BDE configuration to use 4 digit dates.  However, I don't know how to save the date to the date field of a record in a table.  I have used:
      tableDATE.asDateTime := Date;
and it always seems to save it in mm/dd/yy format.  Any guidance on how to save it in mm/dd/yyyy format?
Avatar of JimBob091197
JimBob091197

If you are using Delphi 2 or later it should save the date & time using 4 digits for the year.  It may only display 2 year digits (if your Control Panel is set up this way) but internally all 4 year digits are stored.

JB
Also check your BDE configuration and set the FOURDIGITYEAR parameter to True.
Avatar of northstar

ASKER

I am using Delphi 1.02 and have set the BDE config to FOURDIGITYEAR.
ASKER CERTIFIED SOLUTION
Avatar of mshaer
mshaer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have solved it myself by setting ShortDateFormat := 'mm/dd/yyyy'