Article ID: 126047 - Last Review: November 15, 2004 - Revision: 4.0

Works: Combining Month and Year to Make a Date

This article was previously published under Q126047
Expand all | Collapse all

SUMMARY

If a date has been divided into months, days, and years in separate fields in a database (or columns in a spreadsheet), it can be recombined into one date entry. However, normal concatenation cannot be used because the years and the days are stored as numbers, and the months are stored as the serial number of the first day of that month in the current year. Use the formulas below to combine the date.

MORE INFORMATION

NOTE: Below are formula samples. The formulas should be entered all on one line, in one field. The formulas may also be used to convert separated dates in a spreadsheet by replacing the field names with the appropriate cell references. Each of these formulas produces a serial number that can be translated into the correct date by formatting the field or cell to a date.

If the date has been divided into separate month (spelled out), day, and year fields, the following formula should be used
=VALUE(STRING(MONTH(<Fieldname1>),0)&"/"&STRING(<Fieldname2>,0)&"/"& STRING(<Fieldname3>,0))
where <fieldname1> contains the month spelled out, <fieldname2> contains the day, and <fieldname3> contains the year. If <fieldname1> contains the month as a number, such as a 2 for February, the following formula can be used:
=VALUE(STRING(<Fieldname1>,0)&"/"&STRING(<Fieldname2>,0)&"/"& STRING(<Fieldname3>,0))
If the date has been divided with the month and day in one field and the year in another, use the following formula
=VALUE(STRING(MONTH(<Fieldname1>),0)&"/"&STRING(DAY(<Fieldname1>),0) &"/"& STRING(<Fieldname2>,0))
where <fieldname1> contains the separated month and day, and <fieldname2> contains the year.

If the date has been divided with the day in one field and the month and year in another, use the following formula
=VALUE(STRING(MONTH(<Fieldname1>),0)&"/"&STRING(<Fieldname2>,0)&"/"& STRING(YEAR(<Fieldname1>),0))
where <fieldname1> contains the separated month and year, and <fieldname2> contains the day.

For more information about this topic, please see the following article in the Microsoft Knowledge Base:
123361  (http://support.microsoft.com/kb/123361/EN-US/ ) Works: Spreadsheet or Database Returns ERR Using the & Operator

REFERENCES

For more information about how to perform this task in Works, see your Works printed documentation or online Help.

APPLIES TO
  • Microsoft Works 3.0 Standard Edition
  • Microsoft Works 3.0a
  • Microsoft Works 3.0b
  • Microsoft Works 4.5 Standard Edition
  • Microsoft Works 4.5a
  • Microsoft Works 4.0 Standard Edition
  • Microsoft Works 4.0a
Keywords: 
kbinfo KB126047
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations

 

Related Support Centers