By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,529 Members | 864 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,529 IT Pros & Developers. It's quick & easy.

PHP - date format fails just in IE

scubak1w1
P: 53
Hello,

I have some code that makes an OHM file to send an email based on supplied parameters I construct in the file. The filename and web server path are saved in a variable. Part of the file name and path is the current date and time in a specific format...

The date format is failing JUST in MS Internet Explorer with the following error: "Warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for type date"

The PHP code it is failing on is below:
Expand|Select|Wrap|Line Numbers
  1. //define the OHMM saved file name & location based on the various parameters
  2. $parsed_OHM_file_path_and_name = "C:\logs\safety-incident-report-auto-email~".$logged_on_user."~".date('M-d-Y_H-i-s').".ohm";
  3.  

Any suggestions? I have been poking away Google for an hour or more trying to get a handle on this...

Thanks in advance:
GREG...
Mar 15 '12 #1
Share this Question
Share on Google+
4 Replies


Dormilich
Expert Mod 5K+
P: 8,639
that depends on how you define the date in the query. note that the error complains about the function pg_query(), not the given line.

are you sure your webserver is a Windows machine?
Mar 15 '12 #2

scubak1w1
P: 53
Thanks...
I found the SQL string that pushed data back to PostgreSQL was the issue... but not in and of itself... it is because the data validation - neither via the Spry widgets OR my custom javascript via the OnClick on the Submit button - is firing in Internet destroyer...

I posted as a new question... If you are inclined to take a look I would much appreciate it...
Mar 22 '12 #3

Dormilich
Expert Mod 5K+
P: 8,639
that’s why you always do server side validation.
Mar 22 '12 #4

scubak1w1
P: 53
That happens as well of course...
But I am "lazy", if you can have the user fix it right there and then, that works for me <grin>
Mar 22 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.