472,794 Members | 2,201 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,794 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 2693
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.