ISO date string to google.protobuf.Timestamp?

544 Views Asked by At

I have an ISO date string like this:

2023-06-13T19:34:35.12345Z

and I need to convert it to an com.google.protobuf.Timestamp to store it in a Proto DataStore.

How can I do that? (I am using Kotlin on Android)

1

There are 1 best solutions below

0
Louis Wasserman On

It sounds like you are likely looking for Timestamps.parse.