Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Update create date on SD card file

  1. #1
    Senior Member
    Join Date
    Jul 2017

    Update create date on SD card file

    When im recording sound files to SD card through Teensy it will give some default create date and time. But i need to update exact date and time when creating wave files. Also currently i have access to time stamps. Just need to update the date and time of the created wave files. Also later again i need to extract these created date and time.
    Any suggestions ?

    Thank you

  2. #2
    It depends on what SD library you are using.

    For SDFat library, i do this, to write the current date time upon WAV file creation:

        static void dateTime(uint16_t *date, uint16_t *time)
            // return date using FAT_DATE macro to format fields
            *date = FAT_DATE(year(), month(), day());
            // return time using FAT_TIME macro to format fields
            *time = FAT_TIME(hour(), minute(), second());
    in my setup():


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts