Dates in Firebase

Hi all,

So I was wondering how I could set a value of a field in Firebase equal to a readable date. I’m not sure, but it might have something to do with timestamps. I have recently transitioned from MySQL, and I was wondering if there’s anything similar to the date function. Any help would be greatly appreciated.

Thank you!

If it helps, I’m using Cloud Firestore.

What I’ve done is when I save the date. I make sure to format it as a certain kind, but it’s saved as a string.

And retrieving it, I know what that format is.

Look into DateFormatter in Swift