Convert to date

How can I convert the number 20020415 to date April 15, 2002. Do I work in Microsoft Excel 2003?

Thank!

+3
source share
3 answers

Let cell A1 contain the text 20020415 .

=CONCATENATE(RIGHT(A1, 2), ".", MID(A1,5,2), ".", LEFT(A1, 4))

will create 04/15/2002 .

Then, if you want to save the value, not the formula, you can copy and paste only that value.

Note. This method still saves the date as text.

0
source

If your numbers are always in the same format (i.e. yyyymmdd), use the Excel function Dateto convert your number to date:

, 20020415 A1, B1 :

=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

, , , .

, > , "" ( 15.04.2002).

" " CTRL + 1. , .

+6

A1 , :

=DATE(INT(A1/10000),INT((A1-10000*INT(A1/10000))/100),A1-(100*INT(A1/100)))

Excel.

+2

Source: https://habr.com/ru/post/1735949/


All Articles