If your dashcam's date and time settings are not properly remembered after the dashcam has been off, the dashcam's battery is probably completely flat. In that case, charge the dashcam for a while, preferably via the mains using a USB adapter for your mobile phone.
If the settings are still not properly remembered after that, the dashcam's battery is probably no longer good. The built-in batteries in dashcams are often very small and over time they lose their capacity. They cannot be replaced either, but you can often still use the dashcam as normal.