G
Guest
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.
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.