convert number to date format

Phill032

New Member
Joined
Nov 9, 2016
Messages
38
Hi Guys,

Hopefully someone can help convert the below number into a date format.
18222
This is supposed to correspond to the 20 Nov 2017.
The full data extracted from the report is all in one single cell and each number represents a date seperated by a full stop. I just need the last date. example below

18167. 18167. 18174. 18202. 18213. 18222
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
OK I must be missing something here, how on earth does 18222 correspond to 20 11 2017?
 

Phill032

New Member
Joined
Nov 9, 2016
Messages
38
If i knew that i wouldn't be here :(
Each number represents the date of a price change on the internet of stocked items.
This is the data that my reports pull out, was hoping someone would have seen something similar and have a answer..
 

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
I get that you need an answer, but that is in no date format that I am familiar with. Excel treats dates as a number of days from 0/1/1900, so todays date of 11/26/2017 (US format) is actually 43065


So, with that said, do you have any idea what 18222 might represent? For instance, 18222 days ago was Saturday, January 06, 1968
 

Phill032

New Member
Joined
Nov 9, 2016
Messages
38

ADVERTISEMENT

Yep you are right into it, it is days since the 01/01/68... just had this confirmed from our service provider.
So it is easy to work with now that i know what the numbers relate too.

Thanks for your help
 

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,655
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="text-align: right;;">31-Dec-67</td><td style="text-align: right;;">24837</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="text-align: right;;">18222</td><td style="text-align: right;;">20-Nov-17</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: right;;">18223</td><td style="text-align: right;;">21-Nov-17</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:1.2em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">6a</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B1</th><td style="text-align:left">=A1</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B3</th><td style="text-align:left">=A3+$B$1</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B4</th><td style="text-align:left">=A4+$B$1</td></tr></tbody></table></td></tr></table><br />


If the date sequence starts at Dec 31 1967 (general format 24837),

adding 24837 to the 18222 will yield the specified date.
 

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723

ADVERTISEMENT

OK that makes sense then. Happy to help and thanks for the feedback :)
 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,522
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Trying to guess :confused:
It seems that the in this system the number 1 corresponds to 1 Jan 1968.
So to get the Excel corresponded date all you have to do is add 24837 (corresponds to 31 Dec 1967)

Something like

A
B
1
Starting Date​
31/12/1967​
2
3
Number​
Excel Date​
4
18167​
26/09/2017​
5
18174​
03/10/2017​
6
18202​
31/10/2017​
7
18213​
11/11/2017​
8
18222​
20/11/2017​

Formula in A4 copied down
=A4+B$1

A shot in the dark ;)

M.
 

Phill032

New Member
Joined
Nov 9, 2016
Messages
38
Nice, not the way i was going to go about it but i think this would be better than my way

thanks again
 

Watch MrExcel Video

Forum statistics

Threads
1,129,553
Messages
5,636,989
Members
416,953
Latest member
broexc

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
Top