Results 1 to 7 of 7

Thread: Date

  1. #1

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    USA
    Posts
    33

    Question Date

    I am trying to wite the date to a text file but

    doing

    print #1, date


    isn't doing it... is there anyother way I can do this?

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    You need to be bit more specific. What do you mean "xyz" isn't doing it? What DOES it do?
    Are you closing the file?
    Do you get an error?
    Do you get the data, just in the wrong format?
    WHAT?! Details, please.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152
    yes.. plz explain your problem a bit more
    is it literally printing "date" instead of the date... ???
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Try this...

    VB Code:
    1. Private Sub cmdSaveDate_()
    2. Dim Today As Variant
    3. Today = Format(Now,"mm/dd/yyyy")
    4. Open "c:\MyDateFile.txt" For Append As #1
    5. Print #1, Today
    6. Close #1
    7. End Sub

  5. #5

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    USA
    Posts
    33
    I am able to create, open and close the file but inside the file where I should be printing the date... there isn't anything there.

  6. #6

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    USA
    Posts
    33
    hack... thanks,
    I see where i messed up... i need to format it as (now, ....)
    thanks agian..

  7. #7
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    VB Code:
    1. Print #1, Date

    This always worked for me...
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

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