# Date and Time Formatting in Kotlin with the DateTime Library

DevFeed: [Date and Time Formatting in Kotlin with the DateTime Library](<https://devfeed.tech/articles/date-and-time-formatting-in-kotlin-with-the-datetime-library-24844.md>)

Original publisher: [Read original article](<https://alexzh.com/date-and-time-formatting-in-kotlin-with-the-datetime-library/>)

Author: Alex Zhukovich

Published: 2024-03-01T13:12:08Z

Content type: tutorial

Language: en

Sources: [Alex Zhuk - Android development and testing](<https://devfeed.tech/sources/alex-zhuk-android-development-and-testing.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>)

Tags: [guide](<https://devfeed.tech/tags/guide.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [library](<https://devfeed.tech/tags/library.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [platform](<https://devfeed.tech/tags/platform.md>), [platforms](<https://devfeed.tech/tags/platforms.md>), [pre-release](<https://devfeed.tech/tags/pre-release.md>), [time](<https://devfeed.tech/tags/time.md>)

## AI overview

This tutorial explains how to parse and format dates and times in Kotlin using the kotlinx-datetime v0.6.0-RC library. It covers locale-invariant formatting with Unicode patterns and Kotlin DSL, along with parsing formatted values into date and time types.

## Source excerpt

Explore the art of formatting date and time in Kotlin with the Kotlinx-datetime library. This guide introduces you to the efficient use of Unicode patterns and Kotlin DSL for formatting date and time types. Ideal for Kotlin Multiplatform projects.