By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

Date Formatting Problem

P: n/a
I have an Access 2000 database that pulls a file in everyday via the
TransferText method. The file is named "psjrnl 25-Sep-2003.txt" (the
25-Sep-2003 will change and have the current days date). My problem is I am
trying to give a variable the file name and it just want work. The variable
statement is as follows: PSFILENAME = "psjrnl " & Format(Date,"medium date")
& ".txt" which returns "psjrnl 25-Sep-03.txt". Is it possible to change the
variable statement to look for "psjrnl 25-Sep-2003.txt" so I don't need user
interaction to change the file name? Any help would be greatly appreciated.

Regards,
Mark
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Mark" <he******@yahoo.com> wrote in
news:2M********************@comcast.com:
I have an Access 2000 database that pulls a file in everyday
via the TransferText method. The file is named "psjrnl
25-Sep-2003.txt" (the 25-Sep-2003 will change and have the
current days date). My problem is I am trying to give a
variable the file name and it just want work. The variable
statement is as follows: PSFILENAME = "psjrnl " &
Format(Date,"medium date") & ".txt" which returns "psjrnl
25-Sep-03.txt". Is it possible to change the variable
statement to look for "psjrnl 25-Sep-2003.txt" so I don't need
user interaction to change the file name? Any help would be
greatly appreciated.

Regards,
Mark
just rewrite the format setting to return what you need instead of
"medium date". "dd-mmm-yyyy" looks like it fits your requirements.


Nov 12 '05 #2

P: n/a
Thanks Bob your suggestion worked perfectly.

Mark
"Bob Quintal" <bq******@generation.net> wrote in message
news:3e******************************@news.teranew s.com...
"Mark" <he******@yahoo.com> wrote in
news:2M********************@comcast.com:
I have an Access 2000 database that pulls a file in everyday
via the TransferText method. The file is named "psjrnl
25-Sep-2003.txt" (the 25-Sep-2003 will change and have the
current days date). My problem is I am trying to give a
variable the file name and it just want work. The variable
statement is as follows: PSFILENAME = "psjrnl " &
Format(Date,"medium date") & ".txt" which returns "psjrnl
25-Sep-03.txt". Is it possible to change the variable
statement to look for "psjrnl 25-Sep-2003.txt" so I don't need
user interaction to change the file name? Any help would be
greatly appreciated.

Regards,
Mark

just rewrite the format setting to return what you need instead of
"medium date". "dd-mmm-yyyy" looks like it fits your requirements.

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.