473,320 Members | 2,161 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,320 software developers and data experts.

How to show dates in yyyy-MM-dd format

Hi,

I have installed VS.NET 2000 on an english version of
windows 2000 professional and in control panel I've chosen
Regional Options and on the general Tab I have Swedish in
Your locale(location). In the Input Locales tab I have
Swedish as the only language and set as default. In the
Date tab short date is showed as yyyy-MM-dd and is showed
in all applications in a correct way.

I also have a production server with an english version of
windows 2000 professional with identical settings as
described above in the Regional Options. There is .Net
Framework v1.1 installed, swedish version (also tried with
english version).

Althoug this all dates in all forms are shown in

'MM-dd-yyyy' format.

Several popup forms with dates on them doesn't work
anymore and noone in this country will accept this format.

Any ideas?

TIA

/Kenneth
Nov 18 '05 #1
2 1496
The ToString() method of the DateTime object can be used to format dates.
So, you could use MyDateTime.ToString("yyyy-MM-dd").

For further info on the ToString method of the DateTime object, see this
article on MSDN -
http://msdn.microsoft.com/library/de...tringtopic.asp

Hope this helps,

Mun

--
Munsifali Rashid
http://www.munsplace.com/


"Kenneth" <ke***********@chello.se> wrote in message
news:0d****************************@phx.gbl...
Hi,

I have installed VS.NET 2000 on an english version of
windows 2000 professional and in control panel I've chosen
Regional Options and on the general Tab I have Swedish in
Your locale(location). In the Input Locales tab I have
Swedish as the only language and set as default. In the
Date tab short date is showed as yyyy-MM-dd and is showed
in all applications in a correct way.

I also have a production server with an english version of
windows 2000 professional with identical settings as
described above in the Regional Options. There is .Net
Framework v1.1 installed, swedish version (also tried with
english version).

Althoug this all dates in all forms are shown in

'MM-dd-yyyy' format.

Several popup forms with dates on them doesn't work
anymore and noone in this country will accept this format.

Any ideas?

TIA

/Kenneth

Nov 18 '05 #2
Hi Mun,

Yes it helped.

Although I used another method

Format(Ctype(myDate,Date),"yyyy-MM-dd")

in all textboxes, in grids I used TemplateColumns instead
of BoundColumn

/Kenneth
-----Original Message-----
The ToString() method of the DateTime object can be used to format dates.So, you could use MyDateTime.ToString("yyyy-MM-dd").

For further info on the ToString method of the DateTime object, see thisarticle on MSDN -
http://msdn.microsoft.com/library/default.asp? url=/library/en-
us/cpref/html/frlrfsystemdatetimeclasstostringtopic.asp
Hope this helps,

Mun

--
Munsifali Rashid
http://www.munsplace.com/


"Kenneth" <ke***********@chello.se> wrote in message
news:0d****************************@phx.gbl...
Hi,

I have installed VS.NET 2000 on an english version of
windows 2000 professional and in control panel I've chosen Regional Options and on the general Tab I have Swedish in Your locale(location). In the Input Locales tab I have
Swedish as the only language and set as default. In the
Date tab short date is showed as yyyy-MM-dd and is showed in all applications in a correct way.

I also have a production server with an english version of windows 2000 professional with identical settings as
described above in the Regional Options. There is .Net
Framework v1.1 installed, swedish version (also tried with english version).

Althoug this all dates in all forms are shown in

'MM-dd-yyyy' format.

Several popup forms with dates on them doesn't work
anymore and noone in this country will accept this format.
Any ideas?

TIA

/Kenneth

.

Nov 18 '05 #3

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

Similar topics

7
by: Bambero | last post by:
Hello all Problem like in subject. There is no problem when I want to count days between two dates. Problem is when I want to count years becouse of leap years. For ex. between 2002-11-19...
10
by: Brent Webster | last post by:
This problem seems to occur dependant on the computer system settings. I have no issues when the system date is set as M/d/yyyy but I do have a problem with the system date set as d/M/yyyy. I...
1
by: John | last post by:
I'm building a report where each row represents one month and its 1 to 5 weeks. A report query groups the source table date into a "month and year" expression. A subreport links to the main report...
36
by: Lindie | last post by:
The more I read the more confused I get. Too much on dates calulations in the groups. I need to know how often a book has been loaned out over the past year- 52 weeks. My table has Book...
6
by: carl.barrett | last post by:
Hi, I have a continuous form based on a query ( I will also be creating a report based on the same query). There are 2 fields: Date Obtained and Date Of Expiry I want a further 3 columns...
6
by: Rookie Card | last post by:
I know this is a very common issue but cannot find a thread that resolves the issue. I need to re-format my dates to "MMM d, yyyy". The problem I have is I have an MSSQL database that allows...
0
by: Rookie Card | last post by:
Issue - Reformating the Dates in ASP.NET from a MSSQL Database that has <NULL> values in a SmallDateTime Field to read "Dec 8, 2000" instead of "12/8/2000 12:00:00 AM" (As you might already...
5
by: M Skabialka | last post by:
I am creating my first Visual Studio project, an inventory database. I have created a form and used written directions to add data from a table to the form using table adapters, data sets, etc. ...
8
by: helpless | last post by:
Access 2003 - I am trying to calculate the difference between a specific date 5/1/2007 (not in a data field) and other dates that ARE in a field called Birth Date. I am trying to have it fill into...
7
by: clarencelai | last post by:
Hi.. I need to run some monthly reports that requires the user to pick a date (MMM-YYYY) from a drop down list. How can I list the dates (MMM-YYYY) in the combo box such that it would...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.