Hi,
In Cell A1 i have 50884 : its in text format. i need 8th may 1984 in cell b1 using formula.
for time also: time is text format. eg: 0120 , i ned it has 1:20.
pls tell me the formulas.
Thank you.
Hi,
In Cell A1 i have 50884 : its in text format. i need 8th may 1984 in cell b1 using formula.
for time also: time is text format. eg: 0120 , i ned it has 1:20.
pls tell me the formulas.
Thank you.
That number represents 4/24/2039 not 8 may 1984 - that would be 41402
Anyway, 1st, convert the text to a number = A1*1
then format date as required
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
=datevalue(text(a1,"00-00-00"))
Did you try my suggestion?
Maybe this?
=TEXT(A1,"mm-dd-yyyy")&" "&TEXT(A1,"h:mm")
Yes you are correct, 30810 , I forgot to add/change the year. Thanks for the catch
50884 can be 8 may 84 or 5 aug 1984 now it will depend on your regional settings how it comes out
in mine
=DATEVALUE(TEXT(A1,"00\/00\/00")) comes out as 5 aug 1984
so you may need
=DATE(RIGHT(TEXT(A3,"000000"),2)+IF(RIGHT(A3,2)+0<50,2000,1900),LEFT(TEXT(A3,"000000"),2),MID(TEXT(A3,"000000"),3,2))
to get 8 may 84 for dates between 1950-2050
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Yea here it is:
=IF(LEN(A1)=5,LEFT(A1,1)&"-"&MID(A1,2,2)&"-"&RIGHT(A1,2),LEFT(A1,2)&"-"&MID(A1,3,2)&"-"&RIGHT(A1,2))
or this:
=DATEVALUE(IF(LEN(A1)=5,LEFT(A1,1)&"-"&MID(A1,2,2)&"-"&RIGHT(A1,2),LEFT(A1,2)&"-"&MID(A1,3,2)&"-"&RIGHT(A1,2)))
Last edited by AlKey; 10-07-2013 at 03:00 PM.
if i format its not showing the desired result.
do u have something for time?
thanks
What format do you need?
0120 its in text format. i need it in time format. it should be HH:MM, ie., 1:20
thank you.
I would assume that time in a different cell.
=TIMEVALUE(TEXT(LEFT(A1,2)&":"&RIGHT(A1,2),"h:mm"))
You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks