ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old June 25th, 2003, 08:59 AM
cshontz cshontz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: East Earl, PA
Posts: 7 cshontz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old June 25th, 2003, 09:02 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I don't know MySQL sorry

but try something like:

Response.write Time(RS("time"))

Hope this helps!
Sincerely

Vlince

Reply With Quote
  #3  
Old June 25th, 2003, 09:47 AM
cshontz cshontz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: East Earl, PA
Posts: 7 cshontz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by Vlince
Response.write Time(RS("time"))


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.

Reply With Quote
  #4  
Old June 25th, 2003, 11:01 AM
cshontz cshontz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: East Earl, PA
Posts: 7 cshontz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by Vlince
I don't know MySQL sorry

but try something like:

Response.write Time(RS("time"))

Hope this helps!
Sincerely

Vlince


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.

Reply With Quote
  #5  
Old June 25th, 2003, 03:12 PM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 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

Reply With Quote
  #6  
Old June 27th, 2003, 06:07 AM
rgdubey rgdubey is offline
I am here to share knowledge
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: India
Posts: 83 rgdubey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > MySQL "TIME" Problem w/ ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway