Date (1 Viewer)

Thedon123

Registered User.
Local time
Today, 01:09
Joined
Sep 11, 2002
Messages
98
i am creating a text file using vb of arecrd in a databse.

when the user saves a file it automatically suuggests the file name i have set.

So it woul
d automatically suggest the file is saved as. latest.txt.

What i need help with is i would like to know if there is a way in vb to put the date in the filename automatically so it would save the file as latest(currentdate). e.g latest131102.txt

thanks for your help.
 

simongallop

Registered User.
Local time
Today, 01:09
Joined
Oct 17, 2000
Messages
611
Presume that you have something like

FileName = "latest.txt"

Instead have:

MyDate = Format(Now,"ddmmyy") 'Or whatever format you want!

FileName = "latest" & MyDate & ".txt"

This will give you latest131102.txt

HTH
 

Thedon123

Registered User.
Local time
Today, 01:09
Joined
Sep 11, 2002
Messages
98
thank you very much. it worked.
 

Users who are viewing this thread

Top Bottom