ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

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 ASP Free Forums Sponsor:
  #1  
Old February 27th, 2000, 02:25 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
DateTime

<i><b>Originally posted by : Neal (nealio@home.com)</b></i><br />Hello,<br /><br />I am trying to get my database to post a date.<br /><br />It keeps putting zeros in the date time column ie. 0000-00-00 00:00:00<br /><br /><br />I'm using phpmyadmin for the database. Do I need to set the dabase up differently? Or is it the way I'm coding the string?<br /><br />Here is my code:<br /><br />DateTimeEntrance = Now()<br />IPAddress = Request.ServerVariables("remote_addr")<br />UserAgent = Request.ServerVariables("HTTP_USER_AGENT")<br />Browser = BC.Browser & " " & BC.Version<br />DHTMLSupport = cstr(BC.dhtml)<br />FramesSupport = cstr(BC.frames)<br />TablesSupport = cstr(BC.tables)<br />CookiesSupport = cstr(BC.cookies)<br />BackgroundSounds = cstr(BC.backgroundsounds)<br />JavaScriptSupport = cstr(BC.javascript)<br />JavaAppletsSupport = cstr(BC.javaapplets)<br />ActiveXControlsSupport = cstr(BC.activexcontrols)<br />AOL = cstr(BC.aol)<br />Platform = cstr(BC.platform)<br />VBScriptSupport = cstr(BC.vbscript)<br /><br />mySQL = "insert UTVisitors (DateTimeEntrance, IPAddress, UserAgent, Browser, "<br />mySQL = mySQL & "DHTML, Frames1, Tables1, Cookies, BackgroundSounds, JavaScript, "<br />mySQL = mySQL & "JavaApplets, ActiveXControls, AOL, Platform, VBScript) values ("<br />mySQL = mySQL & "'" & DateTimeEntrance & "', "<br />mySQL = mySQL & "'" & IPAddress & "', "<br />mySQL = mySQL & "'" & UserAgent & "', "<br />mySQL = mySQL & "'" & Browser & "', "<br />mySQL = mySQL & "'" & DHTMLSupport & "', "<br />mySQL = mySQL & "'" & FramesSupport & "', "<br />mySQL = mySQL & "'" & TablesSupport & "', "<br />mySQL = mySQL & "'" & CookiesSupport & "', "<br />mySQL = mySQL & "'" & BackgroundSounds & "', "<br />mySQL = mySQL & "'" & JavaScriptSupport & "', "<br />mySQL = mySQL & "'" & JavaAppletSupport & "', "<br />mySQL = mySQL & "'" & ActiveXControlSupport & "', "<br />mySQL = mySQL & "'" & AOL & "', "<br />mySQL = mySQL & "'" & Platform & "', "<br />mySQL = mySQL & "'" & VBScriptSupport & "') "<br /><br />conn.Execute mySQL<br />

Reply With Quote
  #2  
Old February 27th, 2000, 02:34 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : steve (sschofield@aspfree.com)</b></i><br /><br />might want to use the cdate(blahvariable) around it to format to convert to a date. not familar with phpmydb though.<br /><br />steve<br /><br />------------<br />Neal at 2/27/2000 12:25:21 PM<br /><br />Hello,<br /><br />I am trying to get my database to post a date.<br /><br />It keeps putting zeros in the date time column ie. 0000-00-00 00:00:00<br /><br /><br />I'm using phpmyadmin for the database. Do I need to set the dabase up differently? Or is it the way I'm coding the string?<br /><br />Here is my code:<br /><br />DateTimeEntrance = Now()<br />IPAddress = Request.ServerVariables("remote_addr")<br />UserAgent = Request.ServerVariables("HTTP_USER_AGENT")<br />Browser = BC.Browser & " " & BC.Version<br />DHTMLSupport = cstr(BC.dhtml)<br />FramesSupport = cstr(BC.frames)<br />TablesSupport = cstr(BC.tables)<br />CookiesSupport = cstr(BC.cookies)<br />BackgroundSounds = cstr(BC.backgroundsounds)<br />JavaScriptSupport = cstr(BC.javascript)<br />JavaAppletsSupport = cstr(BC.javaapplets)<br />ActiveXControlsSupport = cstr(BC.activexcontrols)<br />AOL = cstr(BC.aol)<br />Platform = cstr(BC.platform)<br />VBScriptSupport = cstr(BC.vbscript)<br /><br />mySQL = "insert UTVisitors (DateTimeEntrance, IPAddress, UserAgent, Browser, "<br />mySQL = mySQL & "DHTML, Frames1, Tables1, Cookies, BackgroundSounds, JavaScript, "<br />mySQL = mySQL & "JavaApplets, ActiveXControls, AOL, Platform, VBScript) values ("<br />mySQL = mySQL & "'" & DateTimeEntrance & "', "<br />mySQL = mySQL & "'" & IPAddress & "', "<br />mySQL = mySQL & "'" & UserAgent & "', "<br />mySQL = mySQL & "'" & Browser & "', "<br />mySQL = mySQL & "'" & DHTMLSupport & "', "<br />mySQL = mySQL & "'" & FramesSupport & "', "<br />mySQL = mySQL & "'" & TablesSupport & "', "<br />mySQL = mySQL & "'" & CookiesSupport & "', "<br />mySQL = mySQL & "'" & BackgroundSounds & "', "<br />mySQL = mySQL & "'" & JavaScriptSupport & "', "<br />mySQL = mySQL & "'" & JavaAppletSupport & "', "<br />mySQL = mySQL & "'" & ActiveXControlSupport & "', "<br />mySQL = mySQL & "'" & AOL & "', "<br />mySQL = mySQL & "'" & Platform & "', "<br />mySQL = mySQL & "'" & VBScriptSupport & "') "<br /><br />conn.Execute mySQL<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > DateTime


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


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





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