|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
MySQL "TIME" Problem w/ ASP
I have a field of datatype "time", named "time", in a MySQL database. Using ASP, I set RS("time") = time.
When I retrieve the time, Response.Write RS("time"), a date/time value is displayed using the current date, and the stored time: "6/25/2003 8:24:55 AM", instead of just "8:24:55 AM". The time values seem to be correct and show no date in the MySQL database, which I administer using PHPMyAdmin. Does anyone know what I can do to fix this? |
|
#2
|
|||
|
|||
|
I don't know MySQL sorry
but try something like: Response.write Time(RS("time")) Hope this helps! Sincerely Vlince |
|
#3
|
|||
|
|||
|
Quote:
Thanks. I already tried that, to no avail. I'm sure I can achieve the desired results using string manipulation, but I'd rather try to find out why it is behaving like this, and fix it properly. |
|
#4
|
|||
|
|||
|
Quote:
Actually, Vlince - you weren't too far off. I tried "TimeValue()" instead of "Time()" and that worked. I deem "TimeValue()" to be an acceptable, not-too-inconvenient, solution, but I'm still scratching my head over this one. I think I crashed Google trying to find information. |
|
#5
|
|||
|
|||
|
Hehe...I think I crashed Google trying to find information please don't we need it ;-)
One last thing you *could* try is: Response.Write Time(Cdate(RS("time"))) Hope this helps! Sincerely Vlince |
|
#6
|
|||
|
|||
|
MySQL stores the time in 24 hour format, and Windows's default timings are in 12 hour format i.e. AM, PM now you might know why this thing is happenning I have devoted lot of my energy while handling issues related to date and time in MYSQL.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > MySQL "TIME" Problem w/ ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|