Loncat ke daftar isi utama

Bagaimana cara mengubah string waktu menjadi waktu di Excel?

Misalnya, Anda memiliki daftar string teks di lembar kerja, dan sekarang Anda perlu mengubah string teks ini menjadi waktu atau tanggal dan waktu, bagaimana Anda bisa mengatasinya? Di sini saya akan memperkenalkan beberapa trik agar Anda dengan cepat mengubah string teks menjadi waktu di Excel.

Ubah string teks menjadi waktu

Ubah string teks menjadi tanggal dan waktu


panah gelembung kanan biru Ubah string teks menjadi waktu

Untuk mengonversi string teks menjadi waktu, Anda dapat menggunakan beberapa rumus untuk diselesaikan.

1. Pilih sel dan ketikkan rumus ini = TIMEVALUE (KIRI (A1, LEN (A1) -2) & ":" & KANAN (A1,2)) (A1 adalah string teks yang perlu Anda ubah menjadi waktu) ke dalamnya, dan tekan Enter. Jika perlu, Anda dapat menyeret gagang isian ke kisaran yang Anda butuhkan. Lihat tangkapan layar:
doc-waktu-string-ke-waktu-1

2. Kemudian klik kanan pada sel yang dipilih ini, dan pilih Format Cells dari menu konteks, lalu di Format Cells dialog, pilih Waktu dari Kategori daftar di bawah Jumlah tab, lalu pilih jenis waktu yang Anda butuhkan.
doc-waktu-string-ke-waktu-2

3. klik OK, sekarang string teks diubah menjadi waktu.
doc-waktu-string-ke-waktu-3

Catatan:

1. Rumus ini tidak dapat bekerja dengan benar ketika string teks termasuk detik, seperti 120158.

2. Jika format string teks Anda 120456P, Anda dapat menggunakan rumus ini =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2), lalu format sel sebagai format 12 jam yang Anda butuhkan. Lihat tangkapan layar:

doc-waktu-string-ke-waktu-4
doc-waktu-string-ke-waktu-5

panah gelembung kanan biru Ubah string teks menjadi tanggal dan waktu

Jika string teks Anda menyertakan tanggal dan waktu seperti 20141212 0312, Anda dapat menggunakan rumus yang agak panjang untuk menyelesaikannya.

1. Di sel kosong, ketikkan rumus ini =DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))+TIME(MID(A1,10,2),RIGHT(A1,2),0), lalu tekan Enter key, jika perlu, Anda dapat menerapkan rumus ini ke rentang.

2. Kemudian klik kanan pada sel yang dipilih dan pilih Format Cells dari menu konteks, lalu di Format Cells dialog, pilih Tanggal dari Kategori daftar, dan pilih jenis yang Anda butuhkan dari bagian kanan.
doc-waktu-string-ke-waktu-6

3. klik OK. Sekarang Anda dapat melihat string teks diubah menjadi tanggal dan waktu.
doc-waktu-string-ke-waktu-7

Ketik.Jika Anda ingin mengubah waktu menjadi jam, menit, atau detik desimal, coba gunakan Kutools untuk Excel'S Ubah Waktu seperti yang ditunjukkan pada tangkapan layar berikut. Ini berfungsi penuh tanpa batasan dalam 30 hari, silakan unduh dan dapatkan uji coba gratis sekarang.

Ubah waktu dengan cepat menjadi nilai desimal di Excel

Misalnya, Anda memiliki daftar waktu yang perlu diubah menjadi jam, menit, atau detik desimal, bagaimana Anda dapat dengan cepat dan mudah menyelesaikannya di Excel? Itu Ubah Waktu of Kutools untuk Excel, dapat membantu Anda.   Klik untuk uji coba gratis 30 hari!
waktu konversi doc
 
Kutools for Excel: dengan lebih dari 300 add-in Excel yang praktis, gratis untuk dicoba tanpa batasan dalam 30 hari.

Alat Produktivitas Kantor Terbaik

馃 Kutools AI Ajudan: Merevolusi analisis data berdasarkan: Eksekusi Cerdas   |  Hasilkan Kode  |  Buat Rumus Khusus  |  Analisis Data dan Hasilkan Grafik  |  Aktifkan Fungsi Kutools...
Fitur Populer: Temukan, Sorot, atau Identifikasi Duplikat   |  Hapus Baris Kosong   |  Gabungkan Kolom atau Sel tanpa Kehilangan Data   |   Putaran tanpa Formula ...
Pencarian Super: VLookup Beberapa Kriteria    VLookup Nilai Berganda  |   VLookup di Beberapa Lembar   |   Pencarian Fuzzy ....
Daftar Drop-down Lanjutan: Buat Daftar Drop Down dengan Cepat   |  Daftar Drop Down yang Bergantung   |  Multi-pilih Drop Down List ....
Manajer Kolom: Tambahkan Jumlah Kolom Tertentu  |  Pindahkan Kolom  |  Alihkan Status Visibilitas Kolom Tersembunyi  |  Bandingkan Rentang & Kolom ...
Fitur Unggulan: Fokus Kisi   |  Tampilan Desain   |   Bar Formula Besar    Manajer Buku Kerja & Lembar   |  Perpustakaan Sumberdaya (Teks otomatis)   |  Pemetik tanggal   |  Gabungkan Lembar Kerja   |  Enkripsi/Dekripsi Sel    Kirim Email berdasarkan Daftar   |  Filter Super   |   Filter Khusus (filter tebal/miring/coret...) ...
15 Perangkat Teratas12 Teks Tools (Tambahkan Teks, Hapus Karakter, ...)   |   50 + Grafik jenis (Gantt Chart, ...)   |   40+ Praktis Rumus (Hitung usia berdasarkan ulang tahun, ...)   |   19 Insersi Tools (Masukkan Kode QR, Sisipkan Gambar dari Jalur, ...)   |   12 Konversi Tools (Angka ke Kata, Konversi Mata Uang, ...)   |   7 Gabungkan & Pisahkan Tools (Lanjutan Gabungkan Baris, Pisahkan Sel, ...)   |   ... dan banyak lagi

Tingkatkan Keterampilan Excel Anda dengan Kutools for Excel, dan Rasakan Efisiensi yang Belum Pernah Ada Sebelumnya. Kutools for Excel Menawarkan Lebih dari 300 Fitur Lanjutan untuk Meningkatkan Produktivitas dan Menghemat Waktu.  Klik Di Sini untuk Mendapatkan Fitur yang Paling Anda Butuhkan...

Deskripsi Produk


Tab Office Membawa antarmuka Tab ke Office, dan Membuat Pekerjaan Anda Jauh Lebih Mudah

  • Aktifkan pengeditan dan pembacaan tab di Word, Excel, PowerPoint, Publisher, Access, Visio, dan Project.
  • Buka dan buat banyak dokumen di tab baru di jendela yang sama, bukan di jendela baru.
  • Meningkatkan produktivitas Anda sebesar 50%, dan mengurangi ratusan klik mouse untuk Anda setiap hari!
Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Would love any help with this. I have data that is reported as "1d 01h 01m" representing 1 day, 1 hour, 1 min and I need to be able to represent this as a single number (preferably in # of minutes) any thoughts on how I can convert this string to a number value? Thanks all!
This comment was minimized by the moderator on the site
how to convert 06Hr:11Mi into 06:11
This comment was minimized by the moderator on the site
Hi, abinash kumar, you can remove alpha characters from your time string.
This tutorial can help you:
How to remove alpha characters from cells in Excel?
This comment was minimized by the moderator on the site
how do I convert Date/Time with this text format 08/07/2022 1519
This comment was minimized by the moderator on the site
Hi, Tina, please give me a specific example for explaining and descriping your problem. Thank you.
This comment was minimized by the moderator on the site
Hi there!

I used one of formulas above to convert a time string and it worked beautifully expect for anything that had a format of 1200P. It should convert to 12:00 but instead converts to 00:00. Any thoughts on why or how to fix it?

I used: "120456P, you can use this formula =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2)"

I did not have any seconds in my time string so I deleted the last set of 0's in the formula and it still worked.
This comment was minimized by the moderator on the site
Hi.,I have a query.
I want to convert a duration extracted in a format #h #m #s to duration format so that I can filter it. For example:
My data has a field named Session Duration and the format of the cell is "General" and the cell says "1h 2m 15s". I need to convert this data into 01:02:15 but not in time format but a duration. Is there a way to do that.
This comment was minimized by the moderator on the site
=A1/(24*60) (algebra methods)..hahhaha
then apply time format
This comment was minimized by the moderator on the site
How can I convert 1 Hour 35 Min 25 Sec, stored as a text format into Hour format (hh:nn:ss)?
This comment was minimized by the moderator on the site
Hi, Gabriel, you can try this formula =TIME(LEFT(K4,1),MID(K4,8,2),MID(K4,15,2)) K4 is the cell contains text you want to convert, then format the result as time.
This comment was minimized by the moderator on the site
2h 50m how do i convert into 2:50
This comment was minimized by the moderator on the site
Hi, Ayaan, you can try Find and Replace function, h (blank) replace wth : , m replace with nothing
This comment was minimized by the moderator on the site
using the [ =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2) ] formula,
in example #2 above, 123706A >> gets converted to 12:37:06 PM (instead of 12:37:06 AM)
how may this be rectified?
This comment was minimized by the moderator on the site
You only need to change the P to A in the formula =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="A")/2), the format the formula cell as hh:mm:ss AM/PM
This comment was minimized by the moderator on the site
so if you enter 35943A you get 3:59:43 AM (which is great).
but if you enter 123706A you would expect to get 12:37:06 AM but instead you get 12:37:06 PM (which is not so great).
also if you enter 123706P you get 12:37:06 AM (again expecting to get 12:37:06 PM).
the meridiem are only incorrect for 12xxxx, formula works flawlessly for 1~11.
any way to improve the formula, to be all encompassing? thank you
This comment was minimized by the moderator on the site
It is a little complex, sorry I cannot help you. Maybe someone in our forum https://www.extendoffice.com/forum.html can help you if you place the question in it.
This comment was minimized by the moderator on the site
using the [ =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2) ] formula,
in example #2 above, 123706A >> gets converted to 12:37:06 PM (instead of 12:37:06 AM)
how may this be rectified?
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