Skip to content

How to convert string in format "yyyy-mm-dd hh:mm:ss" to localDateTime? #128

Closed
@ccc-sseylani

Description

@ccc-sseylani

I am getting a date in a format like this "2021-03-26 22:02:53" from the API which is not ISO format, and I created a custom serializer for it but I am getting an error.
I also do not want to use ISO format, and I want to send back the date as "yyyy-mm-dd hh:mm:ss".

Since We can not use Java.Date in Kotlin multiplatform, what is the proper solution to serialize date format like this?

image

image

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    formattersRelated to parsing and formatting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions