CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Location
    Lahore, Pakistan
    Posts
    11

    I want to modify a wave file name to System date+time

    I am trying to make a C++ program, which can accept a wave file i.e a file with .wav extention for example abc.wav.
    I will read the wave file buffer by using the read function. then I want to save this file buffer with exact size of the wave file with a name starting with system date+Time for example if the current time and date are 29-april-2003 and time is 12:50 the file should be saved as 29041250.wav
    Hi

  2. #2
    Join Date
    Apr 2003
    Posts
    1,755

    Smile

    Code:
    SYSTEMTIME st;
    GetSystemTime(&st);
    char szFilename[16];
    sprintf(szFilename, "%.2d%.2d%.2d%.2d.wav", st.wDay, st.wMonth, st.wHour, st.wMinute);
    Hope this will help you.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured