Date formula?

trekcowboy

New Member
Joined
Mar 5, 2002
Messages
9
does anyone have a formula for converting numbers to dates.

ex. 03282002 = 03/28/2002

Thanks
 
However, 2832002 will not work.

In a nutshell, the day (mmddyyyy) or month (ddmmyyyy) must have 2 digits for these to work.
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
On 2002-03-28 13:26, Russell Hauf wrote:
However, 2832002 will not work.

In a nutshell, the day (mmddyyyy) or month (ddmmyyyy) must have 2 digits for these to work.

Russell, it's not unreasonable (in fact it's neccessary) to assume that days will always be entered as DD; otherwise, there would be considerable ambiguity for 1122002. Is this 11/2/2002 or 1/12/2002? Gotta have some ground rules! Right?
This message was edited by Mark W. on 2002-03-28 13:42
 
Upvote 0
Exactly. If they aren't entered like that then the solution is not Excel-oriented. But I've seen some interesting stuff at work that would surprise you.
 
Upvote 0
On 2002-03-28 13:55, Russell Hauf wrote:
Exactly. If they aren't entered like that then the solution is not Excel-oriented. But I've seen some interesting stuff at work that would surprise you.

Surprise me? Not a chance! "Interesting stuff" is quite pervasive. :) BTW, while sitting in cross-town traffic I realized that my formula...

=TEXT(REPT(0,8-LEN(A10))&A10,"00-00-0000")+0

...can be further simplified to...

=TEXT(A10,"0-00-0000")+0

Excel will coerce the text string into the correct date value with or without the leading zero.
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,147
Members
449,098
Latest member
Doanvanhieu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top