473,387 Members | 1,545 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,387 software developers and data experts.

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 2746
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
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
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...

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.