473,474 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Date/Time Format. I don't know how to solve this. Thank You.

Hello,

i am just finishing a web site in ASP.net / VB using Dreamweaver MX 2004 and
in all the pages i use the date/time format as follows:

Date: DD-MM-YYYY
Time: HH-MM (24 hours)

Anyway, everything works fine when testing in my computer. However, when i
uploaded the web site to my hosting space in the date/time appears as
follows:

Date: DD-MM-YYYY (uses 1 insted of 01)
Time: HH:MM (12 hours - uses PM and AM)

The formats i am using are:

Date
....ToString(\"d\")

Time
.....ToString(\"t\")

As i said, it works just i want in my computer but in your server everything
changes.

I have no idea of how to solve this. Can somebody help me out?

Thank You Very Much,
Miguel
Nov 18 '05 #1
4 2752
Miguel

Have a look at http://msdn.microsoft.com/library/de...oClassTopic.as

It says D, M, Y use the long date patern. If you want to force with leading zeros try dd/MM/yyy

Chris

----- Miguel Dias Moura wrote: ----

Hello

i am just finishing a web site in ASP.net / VB using Dreamweaver MX 2004 an
in all the pages i use the date/time format as follows

Date: DD-MM-YYY
Time: HH-MM (24 hours

Anyway, everything works fine when testing in my computer. However, when
uploaded the web site to my hosting space in the date/time appears a
follows

Date: DD-MM-YYYY (uses 1 insted of 01
Time: HH:MM (12 hours - uses PM and AM

The formats i am using are

Dat
....ToString(\"d\"

Tim
.....ToString(\"t\"

As i said, it works just i want in my computer but in your server everythin
changes

I have no idea of how to solve this. Can somebody help me out

Thank You Very Much
Migue

Nov 18 '05 #2
Miguel

Have a look at http://msdn.microsoft.com/library/de...oClassTopic.as

It says D, M, Y use the long date patern. If you want to force with leading zeros try dd/MM/yyy

Chris

----- Miguel Dias Moura wrote: ----

Hello

i am just finishing a web site in ASP.net / VB using Dreamweaver MX 2004 an
in all the pages i use the date/time format as follows

Date: DD-MM-YYY
Time: HH-MM (24 hours

Anyway, everything works fine when testing in my computer. However, when
uploaded the web site to my hosting space in the date/time appears a
follows

Date: DD-MM-YYYY (uses 1 insted of 01
Time: HH:MM (12 hours - uses PM and AM

The formats i am using are

Dat
....ToString(\"d\"

Tim
.....ToString(\"t\"

As i said, it works just i want in my computer but in your server everythin
changes

I have no idea of how to solve this. Can somebody help me out

Thank You Very Much
Migue

Nov 18 '05 #3
Miguel Dias Moura wrote:
Hello,

i am just finishing a web site in ASP.net / VB using Dreamweaver MX 2004 and
in all the pages i use the date/time format as follows:

Date: DD-MM-YYYY
Time: HH-MM (24 hours)

Anyway, everything works fine when testing in my computer. However, when i
uploaded the web site to my hosting space in the date/time appears as
follows:

Date: DD-MM-YYYY (uses 1 insted of 01)
Time: HH:MM (12 hours - uses PM and AM)

The formats i am using are:

Date
...ToString(\"d\")

Time
....ToString(\"t\")

As i said, it works just i want in my computer but in your server everything
changes.


The "d" and "t" format strings specify short date and short time
formats. Those formats vary their output based on the CultureInfo in
effect.

If you want to force your particular format regardless of the set
culture, then use:

date.ToString( "dd-MM-yyyy");
time.ToString( "HH-mm");

See the documentation for the DateTimeFormatInfo class for more information.

--
mikeb
Nov 18 '05 #4
Miguel Dias Moura wrote:
Hello,

i am just finishing a web site in ASP.net / VB using Dreamweaver MX 2004 and
in all the pages i use the date/time format as follows:

Date: DD-MM-YYYY
Time: HH-MM (24 hours)

Anyway, everything works fine when testing in my computer. However, when i
uploaded the web site to my hosting space in the date/time appears as
follows:

Date: DD-MM-YYYY (uses 1 insted of 01)
Time: HH:MM (12 hours - uses PM and AM)

The formats i am using are:

Date
...ToString(\"d\")

Time
....ToString(\"t\")

As i said, it works just i want in my computer but in your server everything
changes.


The "d" and "t" format strings specify short date and short time
formats. Those formats vary their output based on the CultureInfo in
effect.

If you want to force your particular format regardless of the set
culture, then use:

date.ToString( "dd-MM-yyyy");
time.ToString( "HH-mm");

See the documentation for the DateTimeFormatInfo class for more information.

--
mikeb
Nov 18 '05 #5

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

Similar topics

3
by: Jay | last post by:
I previously posted this question under Visual Basic newsgroup, but was advised to re-post here. I'm hoping someone can help me solve an issue I'm having with VB.Net and Access 2000. Here's...
5
by: goochey | last post by:
I'm trying to convert a Julian Date (Format "4365") into an actual calendar date in Visual Basic, can anyone help me out with this.
6
by: Dario Di Bella | last post by:
Hi all, we have the following urgent issue affecting our development team. Initially we had one particular workstation that failed executing queries on a DB2 database, raising an invalid date...
0
by: Miguel Dias Moura | last post by:
Hello, i am just finishing a web site in ASP.net / VB and in all the pages i use the date/time format as follows: Date: DD-MM-YYYY Time: HH-MM (24 hours) Anyway, everything works fine when...
0
by: Miguel Dias Moura | last post by:
Hello, i am just finishing a web site in ASP.net / VB using Dreamweaver MX 2004 and in all the pages i use the date/time format as follows: Date: DD-MM-YYYY Time: HH-MM (24 hours) Anyway,...
1
by: Miguel Dias Moura | last post by:
Hello, when i preview an ASP.net web site i am creating to a client Date and Time show as follow: Date: dd-mm-yyyy Time: hh-mm (24 hour clock. Ex: 21:45) Both Date and Time use 2 digits...
9
by: Shapper | last post by:
Hello, I created a dataset from a XML file. One of the dataset fields is . In an ASP:Repeater I am displaying the field. <%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %> The...
30
by: fniles | last post by:
On my machine in the office I change the computer setting to English (UK) so the date format is dd/mm/yyyy instead of mm/dd/yyyy for US. This problem happens in either Access or SQL Server. In the...
10
by: WebCM | last post by:
There is a function: http://paste.ubuntu.com/21865 It needs GMT date in YYYY-MM-DD HH:MM:SS format - in SQL: datetime. If date is the same as today, the function returns "Today". There is one...
0
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,...
0
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...
0
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.