Vai al contenuto principale

Come convertire la data in una stringa numerica o in un formato di testo in Excel?

In questo tutorial, introdurrò diversi metodi per risolvere diversi casi sulla conversione della data in formato numerico o di testo in Excel.
data del documento al testo del numero 1


1. Converti la data in testo

Questa sezione fornisce i metodi per convertire la data in testo in Excel.

Per convertire la data in testo, hai solo bisogno di una formula.

Formula: = TEXT (date, "date_format")

Riferimento: data: la cella con la data che vuoi convertire in testo
formato data: il formato che si desidera visualizzare dopo la conversione della data in testo

Nei casi seguenti, ti dirò come utilizzare questa formula.

1.1 Converti la data in testo nel formato mm / gg / aaaa

Ad esempio, converti la data nella cella A3 in mm / gg / aaaa, usa la formula
= TESTO (A3, "mm / gg / aaaa")
stampa entrare chiave
data del documento al testo del numero 2

Se vuoi convertire la data nella cella A8 in gg / mm / aaaa, usa questa formula
= TESTO (A8, "gg / mm / aaaa")
stampa entrare chiave
data del documento al testo del numero 3

1.2 Converti la data in testo nel formato mmddyyyy o ddmmyyyy

Se desideri convertire la data nella cella A13 in testo, ma in formato mmddyyyy, digita questa formula
= TESTO (A13, "mmddyyyy")
stampa entrare chiave
data del documento al testo del numero 4

Se vuoi convertire la data nella cella A18 in testo nel formato ggmmaaaa, digita questa formula
= TESTO (A18, "ddmmyyyy")
stampa entrare chiave
data del documento al testo del numero 5

1.3 Converti la data in testo in altri formati

In realtà, qualunque sia il formato di testo in cui desideri convertire la data, digita semplicemente il formato che desideri tra virgolette nella formula.

Data (A3) 12/23/2019
Formula = TESTO (A3, "mm-gg-aaaa") = TESTO (A3, "mm / gg") = TESTO (A3, "dd") = TESTO (A3, "g / m / a")
Risultato 23-12-2019 23/12 23 23/12/19

Nuovo!
strumenti di data

16 nuove funzioni e caratteristiche della data risolvono il 90% delle attività sull'elaborazione della data in Excel per te.

◆ Aggiungi o sottrai anno / mesi / giorni / settimane fino ad oggi, clicca per vedere i dettagli.

◆ Aggiungi o sottrai secondi / minuti / ore fino ad oggi, clicca per maggiori.

◆ Contare i fine settimana / i giorni feriali tra due date. clicca per maggiori.

◆ Rimuovi l'ora dalla data. clicca per vedere i dettagli.

◆ Converti il ​​tempo in secondi decimali / munites / ore. clicca per vedere i dettagli.

◆ Conversione di più formati di data nel formato di data standard statunitense. clicca per vedere i dettagli.

Prova gratuita di 30 giorni con funzionalità complete, rimborso entro 30 giorni senza motivo.


2. Converti la data in numero

In questa sezione, fornisco i metodi per convertire la data in numero nel formato a 5 cifre del formato mmddyyyy.

2.1 Converti la data in numero nel formato a 5 cifre

Se vuoi convertire la data in un numero nel formato a 5 cifre, fai come segue:

1. Fare clic con il pulsante destro del mouse sulla cella che contiene la data che si desidera convertire in numero e nel menu di scelta rapida selezionare formato celle comune.
data del documento al testo del numero 6

2. in formato celle dialogo , sotto Numero scheda , selezionare Generale dal riquadro di Categoria.
data del documento al testo del numero 7

3. Clic OK. La data nella cella selezionata è stata convertita in stringa numerica nel formato mmddyyyy.
data del documento al testo del numero 8

2.2 Converti la data in numero nel formato mmddyyyy o ggmmyyyy

Se vuoi convertire la data in una stringa numerica nel formato mmddyyyy o ggmmyyyy, puoi anche applicare la funzione Formato celle.

1. Fare clic con il pulsante destro del mouse sulla cella che contiene la data che si desidera convertire in numero e nel menu di scelta rapida selezionare formato celle comune.

2. Nel formato celle dialogo, sotto Numero scheda, selezionare Custom dal Categoria pannello, quindi vai alla sezione a destra, entra mmddyaaa nella Tipologia casella di testo.
data del documento al testo del numero 9

3. Clic OK. La data nella cella selezionata è stata convertita in stringa numerica nel formato mmddyyyy
data del documento al testo del numero 10

Se desideri convertire la data in una stringa numerica in un altro formato, puoi prendere come riferimento l'elenco di seguito.

Data 2/23/2019
Formatta cella come personalizzato ggmmaaaa ggmmay myyyy aaaammgg
Dsiplay 23022019 230219 022019 20190223

3. Converti la data in mese / giorno / anno o altri formati di data con clic

Se desideri convertire rapidamente la data in mese, giorno, anno o altri formati di data, il file Applica formattazione data utilità di Kutools for Excel sarà una buona scelta da usare.

Dì addio alla mano del topo e alla spondilosi cervicale ora

300 strumenti avanzati di Kutools per Excel risolvono 80% Attività di Excel in pochi secondi, tirati fuori dalle migliaia di clic del mouse.

Gestisci facilmente 1500 scenari di lavoro, non c'è bisogno di perdere tempo per cercare soluzioni, avere molto tempo per goderti la vita.

Migliora la produttività dell'80% per oltre 110000 persone altamente efficienti ogni giorno, ovviamente te compreso.

Non essere più tormentato da formule dolorose e VBA, dai al tuo cervello un riposo e un gioioso umore lavorativo.

Prova gratuita di 30 giorni con funzionalità complete, rimborso entro 30 giorni senza motivo.

Un corpo migliore crea una vita migliore.

Dopo shavasana, sedersi in silenzio; saluti; installazione gratuita di Kutools per Excel, si prega di fare come di seguito:

1. Seleziona le celle che contengono le date che desideri convertire in altri formati di data.

2. Clic Kutools > Formato > Applica formattazione data.
data del documento al testo del numero 11

3. Nel Applica formattazione data finestra di dialogo, seleziona il formato della data che desideri utilizzare Formattazione della data riquadro, nel frattempo, il risultato convertito verrà visualizzato in anteprima a destra Anteprima riquadro.
data del documento al testo del numero 12

4. Clic Ok, le date selezionate sono state convertite nel formato della data selezionato.
data del documento al testo del numero 13

Converti la data in più formati di data individualità con clic

applicare la formattazione della data

Altri suggerimenti sulla conversione della data


Scarica il file di esempio

campione


Strumenti di produttività consigliati

Scheda Office: navigazione a schede, modifica, gestione di documenti in Microsoft Office 2019 - 2003 e Office 365


scheda ufficio

Kutools per Excel: combina più di 300 funzioni e strumenti avanzati per Microsoft Excel


scheda kutools
scheda kutoolsp
Comments (40)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I would very much appreciate your help with this formula.How can I switch month, date ,year “030624”in to a number 306042 and put the number in sequential order after the number 306042 like: 3060421
This comment was minimized by the moderator on the site
Hi, I would very much appreciate your help with this formula.How can I switch month, date ,year “030624”in to a number 306042 and put the number in sequential order after the number 306042 like: 3060421
This comment was minimized by the moderator on the site
Hello, how i convert 13.09.2023 to 13.9 my numbers change into dates
This comment was minimized by the moderator on the site
I want to know how many times I went to check the inspection. which I recorded by days.
This comment was minimized by the moderator on the site
Hello. I would very much appreciate your help with this formula. I am wishing to enter the customer's date of birth in cell I3 (custom formatting mm/dd/yy) and would like that date of birth to automatically populate in A3 cell as mmddyy along with adding the First letter from First name cell F3 and First letter from Last name cell G3 in order to have it auto-populate an ID# for our customers in our database.

A3 F3 G3 I3
ID# First Name Last Name Date of Birth
030199AS Adam Smith 03/01/1999

Thank you so much for any help. You have no idea how much I appreciate it. I have been wracking my brain all night to no avail. :(
Shena Bruno
This comment was minimized by the moderator on the site
Hi, Shena, Bruno, in A3, please use the formula =TEXT(I3, mmddyyyy")&LEFT(F3,1)&LEFT(G3,1).
In the formula, it can be explained as two parts:
TEXT(I3, mmddyyyy") will change the value in I3 to this format mmddyyyy
LEFT(F3,1)&LEFT(G3,1) will extract the first character from left side of the strings in cell F3 and G3.
Hope it is helpful.
This comment was minimized by the moderator on the site
I want to convert the day (Tuesday) which is showing up as 1/3/1900 when you click on it because I added a formula on the original data to provide me with Day values. Now I want to use a pivot table to show me the actual days. How do I convert the 1/3/1900 which shows up at Tuesday to just Tuesday? 
This comment was minimized by the moderator on the site
Hi, Cathey, do you want to convert the formula to an actual value? If so, you can use the Paste as Value Only feature in Excel to copy and paste the formulas as values only, or you can use Kutools for Excel's To Actual feature to convert formulas to values.
This comment was minimized by the moderator on the site
Hi, I was trying to copy and past the value but its still showing the date as opposed to the day. 
This comment was minimized by the moderator on the site
Hi, Cathey, do you choose the Paste as Value option in right-click context menu? If you have choosed, try to press Ctrl +1 keys to enable format cells feature and change the cell format to mm/dd/yyyy in Date section.
This comment was minimized by the moderator on the site
Hello. I have the date 26.01.2021 in the cell A1 and in another cell I have the formula: =RIGHT(A1,4) to take the year from that date, and it returns “4526” instead of “2021”. Do you know how to solve it? Thank you very much!
This comment was minimized by the moderator on the site
try to change the format on cell A1 to general or number and then enter the values that you want again to see if it helps. I think your problem is the format issue.
This comment was minimized by the moderator on the site
Hi, I want to convert month to number. For exp: 8 months (date format) ---> "8" as a number or value. I've change its format but I can't count it.Because I want to put it to math format, for exp: 8-2 = 6 (8 from the months). But the 8 doesn't work.Hope you get it. Thank you for helping!
This comment was minimized by the moderator on the site
Hi i have a date in "13/02/2020 11:42:09" format and i want in MM/DD/YYYY format
This comment was minimized by the moderator on the site
Hi, just select the cell then apply the Text to Columns, in the Text to Columns, choose Delimiter > Space > Date(in the Date format, choose DMY) > Finish.
This comment was minimized by the moderator on the site
There is another way, it returns exactly the numeric format that represents the date abbreviated by (/), it would be: '=Substitute(A1;"/";"")
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations