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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
Post your formula. If your date is truly a date, it should work without converting. Otherwise ,use the DATEVALUE function
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

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