Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have year and day number, can i figure out the date in Excel? 1

Status
Not open for further replies.

Nilo

MIS
Jan 30, 2002
21
US
we have a date code that gives the year and the day number, for example 04270. My question is how do i find out what the exact date is if all i have is the numeric value of the day for any given year?
 
Hi,

Assuming that the data is in A1...
[tt]
=date(left(A1,2),1,1)+Right(A1,3)-1
[/tt]


Skip,
[sub]
[red]Be advised:[/red] [glasses]
Alcohol and Calculus do not mix!
If you drink, don't derive! [tongue][/sub]
 
I forgor to "add" the century
[tt]
=DATE(IF(LEFT(A1,2)<"50","20","19")&LEFT(A1,2),1,1)+RIGHT(A1,3)-1
[/tt]


Skip,
[sub]
[red]Be advised:[/red] [glasses]
Alcohol and Calculus do not mix!
If you drink, don't derive! [tongue][/sub]
 
That's the hint i needed, but with the Date function, I think i have to convert the year into a 4 digit year because the function works off the 1900 date system and the two digit one that i have comes back with 1904 if i have 04...but that's nothing, thanks for the concept!
 
I posted too quick....that did the trick....thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top