Day of Month

Results 1 to 2 of 2

Thread: Day of Month

  1. #1
    Join Date
    Dec 1969

    Default Day of Month

    I have a script that pulls text file names out of a folder and displays them.<BR><BR>the files are named such as 2003-10-23.txt (yr/mth/day)<BR>I can pull the day number out of the file but is there a way to pull the day number out of the filename and say what month name it is? so a file by the name of 2003-10-23.txt would be read as Thursday but a file named 2003-9-23.txt would be read as a tuesday?

  2. #2
    Join Date
    Dec 1969

    Default Convert the filename to a date...

    ...using CDate() and then use the Day() function. Not sure whether CDate() will accept "2003-10-23" or whether you have to convert it to "2003/10/23", but that should be simple enough using Replace().<BR><BR>Oliver.

Posting Permissions

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