How to save the current date/time when I add new value to Firebase Realtime Database

前端 未结 3 1068
猫巷女王i
猫巷女王i 2020-11-22 05:55

I want to save the current date/time in specific field when I add new value to Firebase Realtime Database via control panel.

How can I achieve that?

Please

3条回答
  •  轮回少年
    2020-11-22 06:39

    Use data type Number into Firebase.

    1. Store current millis while storing data into Fireabase.
    2. While retrieving data you will get millis which you were stored previously. Parse in into Java Date Instance and work further.

提交回复
热议问题