Click to See Complete Forum and Search --> : I want to modify a wave file name to System date+time


kmq4
April 30th, 2003, 04:55 AM
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

rxbagain
April 30th, 2003, 05:13 AM
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.