467,187 Members | 1,321 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,187 developers. It's quick & easy.

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
  • viewed: 2346
Share:
4 Replies
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Dario Di Bella | last post: by
reply views Thread by Miguel Dias Moura | last post: by
reply views Thread by Miguel Dias Moura | last post: by
9 posts views Thread by Shapper | last post: by
30 posts views Thread by fniles | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.