"Creating new file everyday"

Can you guys help me to create a new file everyday at midnight so that my sensor data can be stored?