473,667 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date Formatting Problem

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,"me dium 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
2 2719
"Mark" <he******@yahoo .com> wrote in
news:2M******** ************@co mcast.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,"me dium 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
Thanks Bob your suggestion worked perfectly.

Mark
"Bob Quintal" <bq******@gener ation.net> wrote in message
news:3e******** *************** *******@news.te ranews.com...
"Mark" <he******@yahoo .com> wrote in
news:2M******** ************@co mcast.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,"me dium 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3685
by: Ray | last post by:
Date problem. Using non American date formats with Microsoft Access and Visual Basic. I set my regional settings to English(Ireland) or English(United Kingdom) and my date appears in Access as DD/MM/YYYY. However if the day is less than 12 the day then becomes the month e.g. 3 July 2003 is displayed in Visual Basic as 7 March 2003. So if I have two records with different dates as such 6/8/03 and 15/8/03 the first date is 8 June 2003...
3
2179
by: Ed | last post by:
Hi there, My problem is the following: When I assign a custom formatted Date & Time to a Date variable it loses it’s formatting. Ex. 2005-06-07 15:46 now when I assign this to a variable of type Date or DateTime this becomes 2005/06/07 03:46:00 The same code work flawlessly on various other machines, thus I presume this is settings related. I know that the Time function in VB.NET reads from the system time, which you set in...
7
2516
by: Andy Davis | last post by:
I have a table of data in Access 2002 which is used as the source table for a mail merge document using Word 2002 on my clients PC. The data is transferred OK but I've noticed that any dates which fall between 1stday/anymonth/any year and 12thday/anymonth/any year are rearranged in the wrong format. For example 4th July 2005 from the database would be displayed as 07/05/2005 in the merged document. In addition blank date fields from the...
12
1743
by: Rob T | last post by:
I'm storing a date/time into a SQL table of type datetime. I need it to be precise so the value is stored to the 1000th of a second. ie "insert into myTable mydate values ('08/05/2005 2:56:11.987'). This works fine...if you check the value in the table with query analyzer, it shows in there properly. Now, in my app, I'm executing the same query (that I used in QA) and storing tha in a dataview. If I break and watch the program, the...
2
1527
by: Thomas Beyerlein | last post by:
I am binding dates to a textbox, the date is stored in SQL in a datetime field. When it gets bound it turns it into a long date (Sunday, Dec. 25 2005), in SQL when viewing the table it views as a shortdate. When inserted to SQL the datetimepicker format for the date is short. I have not had a problem with the formatting of a date to a textbox before, but this time I am using the CurrencyManager to navigate though several records. This is...
2
2158
by: johndcal | last post by:
Hello All, I have a date value that I pull from a .csv file. After reading the file and storing the values in an array the value of the date could be found in $array, for example. ============================================================= while (($data = fgetcsv($handle,5000, ",")) !== FALSE) { $mydate = $data; // here is the array value that holds the date }
3
5992
by: RJA | last post by:
Hiyas, Using VS .net 2003. Setting up a Webservice that accepts 3rd party vendor designed XML requests and returns a filled XMLDocument with response data. Vendor XSDs were serialize into class objects to be used in the program. EX: Used xsd.exe to turn VendorA_Request.XSD into VendorA_Request.cs EX: Used xsd.exe to turn VendorA_Response.XSD into VendorA_Response.cs
3
3291
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when the field should only be showing one or the other (date or time). Even on the back end of the database where the column properties are, I have chosen the smallest date/time formats. When the aspx page runs, it shows the date and time (ie:in a...
7
2094
by: creative1 | last post by:
Hello everyone. I am experiencing a strange problem that I can't fix on my own. I think I need expert's suggestions for this. The problem is: I want to print account statement (or any other report) from VB form based on an entered date in the masked fields (dd/mm/yy). I am using one form to display five reports. I send date to display report after formatting it (m/dd/yy). When I enter date range like this in masked textbox (DD/MM/YY) ...
9
2924
by: Martin | last post by:
I'm retrieving some records from a database. One of the fields contains a date/time. I would like to format it as I send it out to the table in the displayed page. Can some one please tell me how I can/should do that? Or possibly point me to an on-line explanation? Thanks ps: if it makes any difference, the data is coming from a MS Access
0
8457
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8365
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8788
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8563
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8646
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7390
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6203
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.