# RETURNING A SERIAL NUMBER FROM A DATE

#### navyaa

##### Board Regular
if have a date like 12/05/2002, how would i generate a serial number from it?

THANK YOU,
NAVYA.

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### lenze

##### Legend
If your date is really a date entry, you can just format the cell as NUMBER. (If you have 12/5/2002 in A1, you can enter =A1 in A2 and format A2 as number). If the date is text, use the DATEVALUE function.

##### MrExcel MVP
On 2002-10-29 09:31, navyaa wrote:
if have a date like 12/05/2002, how would i generate a serial number from it?
[...]

A bit strange but...

=DATEVALUE(TEXT(A2,"dd/mm/yy"))

where A2 houses a true date.

Format the formula cell as general.

#### navyaa

##### Board Regular
Thank you very much for your responses.

I tried the date value function but it gives me a VALUE error.My original cell where the date is entered is in the custom format mm/dd/yyyy. Does that make a difference?

Lenze,
I also tried just changing the format to number and it works but how can i do it without having to return the value to another cell. I am trying to use it within a formula where two dates in serial numbers are subtracted.

Thank you very much to you guys for your help,
NavYA.

#### lenze

##### Legend
Post your formula. If your date is truly a date, it should work without converting. Otherwise ,use the DATEVALUE function

#### Mark W.

##### MrExcel MVP
See the Excel Help topic for "Tips on entering dates and times".

#### Barry Katcher

##### Well-known Member
To show the dates as a number without having to return it to another cell, first format the cells to Number (not General) with zero deciaml places, and then enter the date in date format, i.e. 12/12/2002 will appear as 37602. I'm wondering, though, how you will guard against fumbled input. You'll have just a 5-digit number and not the date to check against.

#### navyaa

##### Board Regular
Thank you very much everyone, I got it to work for what I was trying to do using all your suggestions.

Thank you again and i hope you all have a good day

Navya.

Replies
7
Views
368
Replies
1
Views
163
Replies
8
Views
365
Replies
1
Views
265
Replies
1
Views
316

1,181,900
Messages
5,932,703
Members
436,852
Latest member
Borekch

### 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.

### Which adblocker are you using?

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

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