CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Apr 2004
    Posts
    158

    [RESOLVED] Adding date to file name.

    This has become a major headache for me.

    I am simply trying to add the days date to a filename.

    Code:
    FilePathStr = Environment.CurrentDirectory() & "\Data\Data Archive\Padding " & Mydate & ".txt"
    'Mydate' is a string made up of datetime.now.day/month/year.
    I have also tried inserting , now and today
    If I add just one instance of datetime.now.day it works, anymore gives me a DirectoryNotFoundException)

    This is really confusing, any help appreciated.
    Last edited by dajunka; May 29th, 2010 at 03:42 AM. Reason: RESOLVED
    I use VB.Net 2008 in all my wash, for those whiter whites.

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