|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Date Format
Hi - I am trying to output a date as part of my filename however keep getting an error because it isn't formatted properly. (It doesn't like the "/" in the date part). I've tried a few ways of formatting the date but I can't seem to get the correct one! Ideally I'd like the date in either dd-mm-yy or ddmmyy format. Any ideas?
Code:
Dim FDate As Date FDate = Format(Date, "ddmmyy") FileName = "G:\test " & FDate |
|
#2
|
||||
|
||||
|
Quote:
Run a replace function on your date changing '/' to '-'. That should give you the format dd-mm-yy. |
|
#3
|
|||
|
|||
|
Thanks that worked (after I changed my variable to string and not date).
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Date Format |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|