473,382 Members | 1,359 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,382 software developers and data experts.

date format incorrect

I have this code
Now().ToString("MMM-yyyy")
this should return something like Oct-2003
it works fine in a normal vb.net program
when I run this from aspx it returns oct.-2003
the first letter isn't a capital anymore and a point is added
the IIS and the standalone vb.net program are running on the same machine
anybody an idea how i can configure IIS to have the same result?

dominique
Nov 17 '05 #1
1 1239

"Dominique Vandensteen" <domi.vds_p@apoef_tenforce.com> wrote in message
news:#T**************@TK2MSFTNGP12.phx.gbl...
I have this code
Now().ToString("MMM-yyyy")
this should return something like Oct-2003
it works fine in a normal vb.net program
when I run this from aspx it returns oct.-2003
the first letter isn't a capital anymore and a point is added
the IIS and the standalone vb.net program are running on the same machine
anybody an idea how i can configure IIS to have the same result?

dominique


Check to see what language/region setting your web browser (or other client)
is using. The behavior of the MMM date format is dependant on the current
thread culture. In IIS this is determined by an HTTP header in the request,
which isn't the case in a non-IIS-based application.

Typically you'll see "Oct" for English, Spanish, Persian, and Swahili, and
"oct." for French and Romanian. I'm guessing that your operating system is
set to English and your browser is set to French.

You can force it to display "Oct" by setting Thread.Current.CultureInfo to
U.S. English temporarily, but if you want your application to be globalized
you should consider leaving it as-is. Better yet, allow the date format to
be configurable for each culture instead of always using MMM-yyyy.
Nov 17 '05 #2

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

Similar topics

1
by: Alfonso Chavez | last post by:
Hi Everybody, I hope this is the correct newsgroup for this, if not please let me know where should i send this question which is driving me crazy. The problem is the FormatDateTime function...
6
by: Luis | last post by:
I've adapted the following code so that it prints the date in DD/MM/YYYY format. However it prints the incorrect date! If todays date is 01/01/2003 it prints 03/01/2003 - 3 days out! What have I...
5
by: m_t_hill | last post by:
Running MS Access 2000 MS Windows XP Pro This has caused me a lot of hair loss in the last few days so would appreciate any help. I am running code to append/update a local access database...
3
by: Leszek | last post by:
Hello, I believe there must be somwhere in .NET a method to easily deal with the following situation: 1. A user enters a date (myDate) in a format dd/mm/yyyy 2. A method checks if the myDate is...
5
by: Ray | last post by:
I have a table with some audit date and time columns. Problem is the developer who stored the data left them as DECIMAL type instead of DATE and TIME. Is there a way I can convert the DECIMAL type...
3
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...
1
by: scott | last post by:
Hi Everyone, I don't know if this is the correct forum but I thought i'd ask. I have an access DB with a function to automatically safe a table with fields i'm mail merging into MS Word. Word...
21
by: Darin | last post by:
I have an applicatoin that works 100% perfect when running on a machine setup for English (United States), but when I change it to Spanish (Mexico), the dates start giving me fits. THe reason is...
4
by: OzNet | last post by:
I have some functions to calculate the working days in a given period. This includes a table that is queried to calculate the number of public holidays that don’t occur on a weekend. If I test...
3
by: gsreenathreddy | last post by:
Hi! I would like to insert the date in specified format in DB, the date type is Date Type, I am using the following queries to insert the data 1) INSERT INTO EMP VALUES (1, 'red', 'CLERK', 2,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.