Skip to main content
Participant
July 14, 2008
Question

string processing

  • July 14, 2008
  • 1 reply
  • 227 views
I have a directory containing several filenames like below:
xyz~20080714100808.wav
abc~20080214120808.wav
where 20080714100808 means 14jul2008 at 10:08:08am

I would like to read file by file and convert 20080714100808 to standard datetime format.

The whole project is to display them in a table:
1st col: filename
2nd col: datetime

Pls kindly advise.
    This topic has been closed for replies.

    1 reply

    Inspiring
    July 14, 2008
    List the filenames in your directory using <cfdirectory> tag. Loop through the results of your <cfdirectory> tag to get each filename. You can then treat your filename as a list using the character "~" as the delimiter. Get the part where it contains the date and time(using ListGetAt) and then get its substring(the year, month, date, hour, minute, seconds) using the Mid function.