January 21, 1900 ?

I am using Delphi 1.0, and I find that the following code generates a Y2K bug:

FormatDateTime(' dddd, mmmm d, yyyy',
StrToDateTime(DateToStr(Date)));

How do I get this to display the correct century?

Monroe406Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rwilson032697Commented:
Listening
0
intheCommented:
hi
you should read here:
http://www.borland.com/about/y2000/delphi.html

you can get copies of delphi3 for free on some magazine etc..
see www.pcplus.co.uk for a back issue with special deals for upgrading
Regards Barry
0
maharaCommented:
delphi1 may be no y2k compatible, i think. create your solution! (as 00-49 belongs to the new century)

(note that after delphi2, the date is calculated differently: there is a date format change)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Monroe406Author Commented:
The URL is of no value to someone using Delphi 1, and who needs to write 16 bit programs.  The URL simply states...

Delphi 1 & 2 - Product will not be tested and should be considered non-y2k ready.


0
maharaCommented:
monroe, i have several old apps (mostly DOS apps) still working with y2k, with some problems or not.

let me try to help if you encounter any unexpected y2k bugs.

0
Monroe406Author Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.