| JREF Homepage | Swift Blog | Events Calendar | $1 Million Paranormal Challenge | The Amaz!ng Meeting | Useful Links | Support Us |
![]() |
|
|
|
|||||||
| Notices |
| Welcome to the JREF Forum, where we discuss skepticism, critical thinking, the paranormal and science in a friendly but lively way. You are currently viewing the forum as a guest, which means you are missing out on discussing matters that are of interest to you. Please consider registering so you can gain full use of the forum features and interact with other Members. Registration is simple, fast and free! Click here to register today. |
|
|
#1 |
Papa FunkosophyJoin Date: May 2002
Location: Funky Town (STL, MO)
Posts: 23,428
|
Riddle me this, Firefox...
Using Firefox 1.5, I've come across an unusual error. On our live site, everything works fine, but when I view our development site (which is supposed to be nearly identical, I get an SQL error due to the fact that it is reading the date as dd/mm/yyyy instead of mm/dd/yyyy. Both sites work fine in ID, it's just devl site on Firefox.
Now I've scanned through my settings. The only extensions I have for Firefox is Google Toolbar, IE Tab, and Tab Mix Plus. The page in question gives slightly different results when viewed as Firefox or IE in Firefox, but the root cause of the error seems to be the date format. Now, what might be causing Firefox to confuse date formats in this one case and not others? |
|
|
|
|
#2 |
|
King of the Pod People
Moderator
Join Date: Aug 2001
Location: Atlanta, GA
Posts: 20,535
|
SQL error? Could you be a bit more specific about what the page is doing?
I'm in the middle of coding a struts-based reporting app, so right now I am The Man when it comes to date formats.
|
|
|
|
|
#3 |
Papa FunkosophyJoin Date: May 2002
Location: Funky Town (STL, MO)
Posts: 23,428
|
Code:
-2147217913 The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. SQL:SELECT TOP 2 UID, AdUnitPage, AdType, PI FROM AdContent WHERE AdUnitSize='728X90' and datestart<='26/07/2006' and datestop>='26/07/2006' and datestop>='26/07/2006' and available>0 order by LastViewed; I reset all Firefox preferences and it seems to be working again. I don't know which one made the difference. |
|
|
|
|
#4 |
|
Lizard Scum
Join Date: Jan 2005
Location: Arizona Bay
Posts: 1,206
|
Sounds like the app is feeding a client side - and thus untrustworthy - date into the proc...
|
|
__________________
Faith: Belief without evidence in what is told by one who speaks without knowledge, of things without parallel. - Ambrose Bierce Question your argument if you must mock your opponent to make it... Step 1 in helping spread the skeptical way of thinking: Don't be a jerk. |
|
|
|
|
|
#5 |
|
King of the Pod People
Moderator
Join Date: Aug 2001
Location: Atlanta, GA
Posts: 20,535
|
What ES said. I encourage you to rethink the structure of this app.
|
|
|
|
|
#6 |
|
Muse
Join Date: May 2005
Location: London, Ontario
Posts: 867
|
|
|
__________________
Ripley 29 "Professor, without knowing precisely what the danger is, would you say it's time for our viewers to crack each other's heads open and feast on the goo inside?" "Yes I would, Kent." |
|
|
|
|
|
#7 |
Papa FunkosophyJoin Date: May 2002
Location: Funky Town (STL, MO)
Posts: 23,428
|
Many revisions planned, but we have to support the current system until that point. You know how it goes.
|
|
|
|
|
#8 |
|
King of the Pod People
Moderator
Join Date: Aug 2001
Location: Atlanta, GA
Posts: 20,535
|
It just screams security problems, but at this point what I would do is run a Javascript function to force a format of the date.
For example, if you absolutely, positively, need a MM/DD/YYYY format, do something like this: Code:
function formatNumber(i) {
if(i< 10) {
return("0" + i);
}
else {
return(i);
}
}
function formatDate() {
var today = new Date();
var day = today.getDate();
var month = today.getMonth() + 1; // Month is 0-based
var year = today.getYear();
// Some clients do "year" as years since 1900, eg 106
if(year < 1000) {
year += 1900;
}
var str = formatNumber(month) + "/" + formatNumber(day) + "/" + year;
return(str);
}
|
|
|
|
|
#9 |
|
NLH
Join Date: Oct 2002
Posts: 25,885
|
|
|
|
|
|
#10 |
|
Not bored. Never bored.
Moderator
Join Date: May 2003
Location: Leicester, UK
Posts: 7,085
|
Two sentences, surely? And only one of them particularly pithy, I'd've thought.
Cheers, Rat. |
|
__________________
"Man muß den Menschen vor allem nach seinen Lastern beurteilen. Tugenden können vorgetäuscht sein. Laster sind echt." - Klaus Kinski UKLS 1988- Sitting on the fence throwing stones at both sides. |
|
|
|
|
|
#11 |
|
Director of Hatcheries and Conditioning
Join Date: Jul 2002
Location: Mt Disappointment
Posts: 33,334
|
What is the regional location for the machine set to? A lot of programs get the date format from that.
|
|
__________________
Continually pushing the boundaries of mediocrity. Everything is possible, but not everything is probable. For if a man pretend to me that God hath spoken to him supernaturally, and immediately, and I make doubt of it, I cannot easily perceive what argument he can produce to oblige me to believe it. Hobbes |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|