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 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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:
...
|
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...
|
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...
|
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-...
|
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=""...
|
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,...
|
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 ...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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....
|
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...
| |