473,320 Members | 2,117 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,320 software developers and data experts.

HELP!! Win 2003 datetime format

Hello -

I had originally posted this question and was told the problem was caused by
a setting on the host and could not be changed there. I called the host to
see if they knew how I can solve my problem and they didn't have a clue.
They are running Windows Server 2003.

I have datagrids that display date and time from Sql Server 2000. In Sql
Server it's derived from GetDate(). The date comes out okay. It's the time
I'm having a problem with. I want a simple time, e.g., 6:05 AM

I've tried displaying it as:
<%# DataBinder.Eval(Container.DataItem, "ReplyDT", "{0:t}") %>
That produces a military time on their machine. On mine, it comes out all
right. I'm running XP Pro.

I then tried to be specific:
<%# DataBinder.Eval(Container.DataItem, "ReplyDT", "{0:h:mm:ss tt}") %>
That comes out fine on my machine and on the web it shows up with the
correct time, but followed by some strange "T"-type character followed by
somewhat of a strange "4" (sort of) character in the place of the AM or PM.

I then tried just plain "g" to see what would happen. That gave me military
time again.

I'm wondering if a look at the Regional Settings in Windows 2003 Server
might reveal some other values I could try. I do not currently have W2003
installed.

Any help with this would be greatly appreciated!! I can't believe there's
no way around this.

--
Sandy
Nov 19 '05 #1
1 1219
I am answering this question myself in case anyone else runs into this
problem. Dave from my service provider finally was the one who solved it.

I did not realize my host was international. I therefore had to put
culture='en-US'
at the top of the page directive in my html page. It now functions perfectly.
--
Sandy
"Sandy" wrote:
Hello -

I had originally posted this question and was told the problem was caused by
a setting on the host and could not be changed there. I called the host to
see if they knew how I can solve my problem and they didn't have a clue.
They are running Windows Server 2003.

I have datagrids that display date and time from Sql Server 2000. In Sql
Server it's derived from GetDate(). The date comes out okay. It's the time
I'm having a problem with. I want a simple time, e.g., 6:05 AM

I've tried displaying it as:
<%# DataBinder.Eval(Container.DataItem, "ReplyDT", "{0:t}") %>
That produces a military time on their machine. On mine, it comes out all
right. I'm running XP Pro.

I then tried to be specific:
<%# DataBinder.Eval(Container.DataItem, "ReplyDT", "{0:h:mm:ss tt}") %>
That comes out fine on my machine and on the web it shows up with the
correct time, but followed by some strange "T"-type character followed by
somewhat of a strange "4" (sort of) character in the place of the AM or PM.

I then tried just plain "g" to see what would happen. That gave me military
time again.

I'm wondering if a look at the Regional Settings in Windows 2003 Server
might reveal some other values I could try. I do not currently have W2003
installed.

Any help with this would be greatly appreciated!! I can't believe there's
no way around this.

--
Sandy

Nov 19 '05 #2

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

Similar topics

2
by: Harikumar G | last post by:
Friends, My hardware sends me a date format like this 15:10:20.99 UTC Mon Oct 18 2004 I need to process this format and parse to a valid SQL datetime format, how can I do it more easily? My...
0
by: vooose | last post by:
Suppose you have a DataTable which is part of a DataSet that has a column of type DateTime. When you call ds.GetXml() the date comes out looking something like this: ...
2
by: Grey | last post by:
I use the DateTime format to change the date format, i.e. string a = "21/02/2004"; Convert.ToDateTime(a).ToString("MMMM dd, yyyy"); These two lines work well in my VS.NET development machine. But...
4
by: Shane D. | last post by:
I have tried contacting the list owner, but nobody responds so I am knowingly sending administrative mail to the list. Sorry folks. For months, particularly since February, I have been...
1
by: Ugur Ekinci | last post by:
Hi , I have two Sql Server 2000 on seperate machines , First one accepts datetime format like ("dd.MM.yyyy hh:mm:ss") And Second one accepts datetime format like ("MM.dd.yyyy hh:mm:ss") 1-...
3
by: INeedADip | last post by:
I have seen this problem posted all over, but have never ran across a solution.... I am serializing my dataset and they look like this: <NewDataSet> <xs:schema id="NewDataSet" xmlns=""...
2
by: bhv | last post by:
hello everybody, i have datetime format in mysql database table. now, in mysql date is YYYY-MM-DD format. how can i insert date in this format with VB Script ? i had tried following dim dt, dy,...
2
by: joyjignesh | last post by:
hi i have make a report with mshflexgrid. the report between two date. when i have written query .open"select * from tablename where t_date>=convert(datetime,' " & text1.text &"') and ...
2
by: LukasMalik | last post by:
Hi all, in my application, I am using DateTime. Until I got in contact with SQL I did not try to solve this problem. Where is set DateTime format? Will somehow change application DateTime format...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.