I use the DateTime format to change the date format, i.e.
string a = "21/02/2004";
Convert.ToDateT ime(a).ToString ("MMMM dd, yyyy");
These two lines work well in my VS.NET development machine. But it fail in
my production server. I don't know the reason??
My development machine: winXP Pro, VS.NET 2003
My Production machine: Win2000 server with SP4, .NET Framework 1.1
--
Best Regards,
Eric Yum 2 1938
error message?
--
Curt Christianson
Owner/Lead Developer, DF-Software www.Darkfalz.com
"Grey" <er*****@i-cable.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. I use the DateTime format to change the date format, i.e. string a = "21/02/2004"; Convert.ToDateT ime(a).ToString ("MMMM dd, yyyy"); These two lines work well in my VS.NET development machine. But it fail in my production server. I don't know the reason?? My development machine: winXP Pro, VS.NET 2003 My Production machine: Win2000 server with SP4, .NET Framework 1.1
-- Best Regards,
Eric Yum
"Grey" <er*****@i-cable.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. I use the DateTime format to change the date format, i.e. string a = "21/02/2004"; Convert.ToDateT ime(a).ToString ("MMMM dd, yyyy"); These two lines work well in my VS.NET development machine. But it fail in my production server. I don't know the reason?? My development machine: winXP Pro, VS.NET 2003 My Production machine: Win2000 server with SP4, .NET Framework 1.1
-- Best Regards,
Eric Yum
The settings on your development machine specify a default dd/MM/yyyy
format,
and your server has MM/dd/yyyy.
You can specify the format with:
DateTimeFormatI nfo myDTFI = new DateTimeFormatI nfo();
myDTFI.ShortDat ePattern = "dd/MM/yyyy";
DateTime dt = DateTime.Parse( myDateString, myDTFI);
Hans Kesting This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Reny J Joseph Thuthikattu |
last post by:
Hi,
I have a variabe in the format of 'DD-MON-YYYY HH:MI AM' .I want to add a
miniute to it.How can i do that?
by manipulation i want to make '01-JUNE-2004 11:59 PM' to '02-JUNE-2004
12:00 AM'
How do i do that?
Reny
---
|
by: Cor Ligthert |
last post by:
Hello everybody,
Jay and Herfried are telling me every time when I use CDate that using the
datetime.parseexact is always the best way to do String to datetime
conversions. They don't tell why only that I have to listen to them because
they know it better.
They told also that in a business situation it is better to use
datetime.parseexact for changing cultures and not to use the globalization
setting. I did not give them this sample,...
|
by: B.N.Prabhu |
last post by:
Hi,
I am having a DataTable which one column is in string format now i want to
change that one to DataTime. I don't know whether its in datetime format or
not i have to check if it is in DateTime Format some times it may in normal
string not a DateTime. If it is in any one of the DateTime format then i have
to change it as a Specfic format as "21-03-2005 11:34" using C#.Net.
If its not in DateTime format then i should give a message.
|
by: Arpan |
last post by:
A SQL Server 2005 DB table has 4 columns namely "ID" (IDENTITY int
column), "FirstName" (varchar(50)), "LastName" (varchar(50)) & "DOB"
(datetime). Now when I am trying to add a new row using the following
INSERT statement:
sqlDapter.InsertCommand = New SqlCommand
sqlDapter.InsertCommand.CommandText = "INSERT INTO UserDetailss
VALUES('bobby','simpson','" & Now() & "')"
sqlDapter.InsertCommand.Connection = sqlConn
sqlDapter.Update(dSet,...
|
by: js |
last post by:
I have a textbox contains text in the format of "yyyy/MM/dd hh:mm:ss".
I need to parse the text using System.DateTime.Parse() function with
custom format. I got an error using the following code. Could someone
help me with the customization? Thanks.
String was not recognized as a valid DateTime. at
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi,
DateTimeStyles styles) at System.DateTime.Parse(String s,
IFormatProvider...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |