473,416 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

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 1928
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********@duster.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 =
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.


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.TransferText 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.adelaide.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
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 =...
10
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...
13
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...
17
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...
1
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...
6
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...
12
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...
0
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...
3
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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...

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.