RETURNING A SERIAL NUMBER FROM A DATE

navyaa

Board Regular
Joined
Jul 7, 2002
Messages
223
if have a date like 12/05/2002, how would i generate a serial number from it?

THANK YOU,
NAVYA.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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
Joined
Jul 7, 2002
Messages
223
Thank you very much for your responses.

Aladin,
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
Joined
Feb 18, 2002
Messages
13,690

ADVERTISEMENT

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

Barry Katcher

Well-known Member
Joined
Feb 25, 2002
Messages
4,053
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
Joined
Jul 7, 2002
Messages
223
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.
 

Forum statistics

Threads
1,143,915
Messages
5,721,506
Members
422,369
Latest member
redinator

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