Worried over Y2K? Now here's a Y1.9K problem

With all the talk about the year 2000 problem, you may not be aware that Excel also suffers from a year 1900 (Y1.9K) problem.

People who use Excel to store historical information often need to work with dates earlier than January 1, 1900. The only way to create a date such as July 4, 1776, in Excel is to enter it into a cell and have the program interpret it as text. Unfortunately, you can't manipulate dates stored as text - if you want to alter their formatting, for example, or if you need to calculate the day of the week they fell on.

To address this problem, I created an add-in (for Excel 97 or later versions) called Extended Date Functions. With this add-in installed, you'll have access to eight new worksheet functions that let you work with dates in any year from 0100 to 9999. You can download a free copy of it from www.j-walk.com, or from our cover CD of the October 1999 edition.

The new functions are:

XDATE(y,m,d,fmt): returns the specified date (as text) in the format specified by the fmt format string (optional).

XDATEADD(date1,day,fmt): returns the date (as text) that is day number of days after date1 in the format specified by the fmt format string (optional).

XDATEDAY(date1): returns the unique day number for a date.

XDATEDIF(date1,date2): returns the number of days between two dates.

XDATEDOW(date1): returns an integer corresponding to the day of the week.

XDATEMONTH(date1): returns the month number for a date.

XDATEYEAR(date1): returns the four-digit year for a date.

XDATEYEARDIF(date1,date2): returns the number of full years between two dates; useful for calculating ages.

Both XDATE and XDATEADD functions return a text string. You can't use Excel's date formats with this string, but you can provide a format string as an argument for the function. For example, the formula below adds five days to December 1, 1895 and displays the result as 'Dec-06-1895' (these functions use standard Excel format strings):


Be careful if you plan to insert dates that occurred before 1752. Differences between the historical American, British, Gregorian, and Julian calendars can result in inaccurate computations. For details, check out http://www.cst.cmich.edu/users/GrahamS/Pub/Doomsday/DoomsdayIntro.html.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

John Walkenbach

PC World
Show Comments

Brand Post

Bitdefender 2019

Shop safely with our award-winning security solution. Protect yourself this Black Friday and get the exclusive Black Friday discount for Bitdefender 2019!

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Maryellen Rose George

Brother PT-P750W

It’s useful for office tasks as well as pragmatic labelling of equipment and storage – just don’t get too excited and label everything in sight!

Cathy Giles

Brother MFC-L8900CDW

The Brother MFC-L8900CDW is an absolute stand out. I struggle to fault it.

Luke Hill


I need power and lots of it. As a Front End Web developer anything less just won’t cut it which is why the MSI GT75 is an outstanding laptop for me. It’s a sleek and futuristic looking, high quality, beast that has a touch of sci-fi flare about it.

Emily Tyson

MSI GE63 Raider

If you’re looking to invest in your next work horse laptop for work or home use, you can’t go wrong with the MSI GE63.

Laura Johnston

MSI GS65 Stealth Thin

If you can afford the price tag, it is well worth the money. It out performs any other laptop I have tried for gaming, and the transportable design and incredible display also make it ideal for work.

Andrew Teoh

Brother MFC-L9570CDW Multifunction Printer

Touch screen visibility and operation was great and easy to navigate. Each menu and sub-menu was in an understandable order and category

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?