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!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
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

Most Popular Reviews

Latest Articles


PCW Evaluation Team

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

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?