I have a date that is noted in this format : 19521016 where 1952 is year, 10
is month, and 16 is date.
Now how to convert this to dd/mm/yyyy format.
I have a date that is noted in this format : 19521016 where 1952 is year, 10
is month, and 16 is date.
Now how to convert this to dd/mm/yyyy format.
In a sheet, you could use a formula like the following to convert the number
to a date and format it any way you'd like:
=DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,2,2))
where the date is in cell a1. In VBA, you could do the same thing using the
Left, Mid and DateSerial functions.
Stuart
"Guru" wrote:
> I have a date that is noted in this format : 19521016 where 1952 is year, 10
> is month, and 16 is date.
>
> Now how to convert this to dd/mm/yyyy format.
At the simplest level,assuming your date is in cell B10 then
19521016
c10 =LEFT(B10,4)
d10 =MID(B10,5,2)
e10 =RIGHT(B10,2)
f10 =DATE(C10,D10,E10)
and apply custom format "dd/mm/yyy"
"Guru" wrote:
> I have a date that is noted in this format : 19521016 where 1952 is year, 10
> is month, and 16 is date.
>
> Now how to convert this to dd/mm/yyyy format.
Simpler:
Select the cell. Choose Data/Text to Columns. Click Next, Next. Choose
YMD from the Date dropdown. Click Finish.
In article <[email protected]>,
Marvin <[email protected]> wrote:
> At the simplest level,assuming your date is in cell B10 then
>
> 19521016
> c10 =LEFT(B10,4)
> d10 =MID(B10,5,2)
> e10 =RIGHT(B10,2)
> f10 =DATE(C10,D10,E10)
> and apply custom format "dd/mm/yyy"
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks