473,598 Members | 3,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent Help on Australian dates on spreadsheet saving as American dates on a text file.

I have a spreadsheet that uses VBA code in Access to save itself as a text
file. The line is as follows.

xl.ActiveSheet. SaveAs CurrentProject. Path & "\Reports\" &
DLookup("[LetterLabel]", "tblButtons ", "ControlID=141" ) & ".txt", 20 ' 20 =
xlTextWindows

The code is using a DLookup to get the filename because it is different on
different sites.

The major problem, that has just been noticed is that the program is used in
Australia, but the dates saving in the text file are in American format.
They are in Australian format in the spreadsheet, but American in the text
file. This is unacceptable and I need to be able to force them into
Australian date format when the spreadsheet is saved as a text file The
format I need is dd/mm/yyyy.

Can anyone help - please?

dixie
Dec 2 '05 #1
4 1947
TC
This is an Excel issue, right? Not an Access one? (You're using an
Excel method to save the worksheet, not an Access one.) So I'd try
asking on an Excel group, they would be more likely to know.

HTH,
TC

Dec 2 '05 #2
>Dixie wrote: ".... - This is unacceptable and I need to be able to force them into
Australian date format when the spreadsheet is saved as a text file The
format I need is dd/mm/yyyy."


Hi Dixie,

I'm sure this is not what your after; however, I'm curious; once
your data has been exported to Excel, can you not re-format your date
cells/column to the desired format, using the custom format cells
option, i.e. dd-mmm-yyyy ?

Cheers,

Dave

Dec 2 '05 #3
In message <43********@dus ter.adelaide.on .net>, Dixie
<di***@dogmail. com> writes
I have a spreadsheet that uses VBA code in Access to save itself as a text
file. The line is as follows.

xl.ActiveSheet .SaveAs CurrentProject. Path & "\Reports\" &
DLookup("[LetterLabel]", "tblButtons ", "ControlID=141" ) & ".txt", 20 ' 20 =
xlTextWindow s

The code is using a DLookup to get the filename because it is different on
different sites.

The major problem, that has just been noticed is that the program is used in
Australia, but the dates saving in the text file are in American format.
They are in Australian format in the spreadsheet, but American in the text
file. This is unacceptable and I need to be able to force them into
Australian date format when the spreadsheet is saved as a text file The
format I need is dd/mm/yyyy.


Try altering the spreadsheet. Reformat the cells as text instead of
date.

You are more likely to get useful help in an Excel newsgroup.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author.

Dec 2 '05 #4
Thanks for the help everyone who offered it. I ended up taking the
following approach.

1, Creating a make table query that puts the recordset I want to export into
a temporary table.
2. Creating an export specification for it.
3. Using the DoCmd.TransferT ext command to send the data.

It seems to work OK now. The problems I was having are no longer apparent.

dixie

"Dixie" <di***@dogmail. com> wrote in message
news:43******** @duster.adelaid e.on.net...
I have a spreadsheet that uses VBA code in Access to save itself as a text
file. The line is as follows.

xl.ActiveSheet. SaveAs CurrentProject. Path & "\Reports\" &
DLookup("[LetterLabel]", "tblButtons ", "ControlID=141" ) & ".txt", 20 ' 20
= xlTextWindows

The code is using a DLookup to get the filename because it is different on
different sites.

The major problem, that has just been noticed is that the program is used
in Australia, but the dates saving in the text file are in American
format. They are in Australian format in the spreadsheet, but American in
the text file. This is unacceptable and I need to be able to force them
into Australian date format when the spreadsheet is saved as a text file
The format I need is dd/mm/yyyy.

Can anyone help - please?

dixie

Dec 3 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7372
by: Fabio | last post by:
Hello, there's a module called Spreadsheet::WriteExcel. It allows me to create a new worksheet and edit its cells: my $workbook = Spreadsheet::WriteExcel->new('my.xls'); my $worksheet = $workbook->addworksheet(); $worksheet -> write('A2', 222); But how can I put some values into the cells of an existing worksheet?
10
5823
by: Robert Zirpolo | last post by:
For some reason a stored procedure which I have created is incorrectly saving the date to the table. It seems the day and month are being swapped around e.g. a date which should be the 12th April (12/04/2005) is saving as the 4th December (04/12/2005). The parameter used in the stored procedure comes from a VB6 app, I amended this so the format was "yyyymmdd hh:mm:ss". The full line in VB being, Parameters.Append...
13
7772
by: Dixie | last post by:
How do I, in VBA from an access form module, add 5 rows to the top of a spreadsheet called MySpreadsheet.xls. The worksheet is called MyWorksheet and there is already data in the first 5 rows. I simply need to insert 5 blank rows at the top and move the rest of the data down so it starts at row 6. dixie
17
4106
by: ginkim | last post by:
Hi, I'm trying to work with the Australian date formats and javascript and it's causing me quite a headache. I have a date in a "dd/mm/yy" format. Whenever I try to retrieve that date from my javascript, it'd return some random date that doesn't make sense. For example, var time = new Object;
1
4198
by: viki.sanjeeva | last post by:
Hi, There is a date field in JSP form where user will enter date in dd-mm-yyyy format. Now before saving into DB2, I want to validate the date format against dd-mm-yyyy format and then save into DB2. I've tried reading SimpeDateFormat and other date format classes, but couldn't understand. It will be great if somebody tell the following with code.
6
1519
by: thechaosengine | last post by:
Hi guys, I'm developing a web app on a UK computer. When I put a date into a textbox, its in the format DD/MM/YY. The DateTime object takes that in and handles in perfectly. Now, I need to start using the american format MM/DD/YY. My question is, how do I get the DateTime object to recognise what I'm passing in as an American date? If the machine is installed on an american server,
12
2429
by: Dixie | last post by:
I am trying to calculate the number of workdays between two dates with regards to holidays as well. I have used Arvin Meyer's code on the Access Web, but as I am in Australia and my date format is dd/mm/yyyy, I have found that the dates I put in my holidays table are reversed into American dates. So, the wrong holiday dates are subtracted from the total workdays between the start and end dates. Is there an easy fix for this? ******Code...
0
2664
by: georges the man | last post by:
The purpose: • Sorting and Searching • Numerical Analysis Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical price of a stock. The program will allow users to query the stock price of a particular date and output its statistics (mean price, median price and standard deviation) for any specified period. Your program must be menu driven and works as follows.
3
1525
by: David | last post by:
Hi, I have a code for filling a dropdown, but I cannot work out how to make it fill with every date, including todays date, as required below i.e. 05/10/2006 06/10/2006 07/10/2006 08/10/2006
0
7987
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
8392
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8264
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
6718
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...
0
5438
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3939
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2412
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
1
1504
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1250
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.