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

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

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
 
G

Guest

Miguel

Have a look at http://msdn.microsoft.com/library/d...mGlobalizationDateTimeFormatInfoClassTopic.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
 
M

mikeb

Miguel said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top