473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Date formats

I read this and got confused...

I use PHP and got this:
$sql = "delete from blabla where startdate< =
to_date('2000.05.05','YYYY-MM-DD')";
$result=odbc_exec($conn, $sql);

Result: Warning: odbc_exec() [function.odbc-exec]: SQL error:
[Microsoft][ODBC SQL Server Driver][SQL Server]'to_date' is not a
recognized function name.

to_date should work?

At the other end i'd like to read out startdate as a date var or format
it as I need.... (dd.mm.yyyy). Convert makes me confused... help
please?

S

Dec 4 '06 #1
3 5361
Hi

to_date is for Oracle

Pull out the date and do the conversion in php. Let the database do
data things

Sam

On Dec 4, 2:02 pm, "Sonnich" <sonnich.jen...@elektrobit.comwrote:
I read this and got confused...

I use PHP and got this:
$sql = "delete from blabla where startdate< =
to_date('2000.05.05','YYYY-MM-DD')";
$result=odbc_exec($conn, $sql);

Result: Warning: odbc_exec() [function.odbc-exec]: SQL error:
[Microsoft][ODBC SQL Server Driver][SQL Server]'to_date' is not a
recognized function name.

to_date should work?

At the other end i'd like to read out startdate as a date var or format
it as I need.... (dd.mm.yyyy). Convert makes me confused... help
please?

S
Dec 4 '06 #2
I use PHP and got this:
$sql = "delete from blabla where startdate< =
to_date('2000.05.05','YYYY-MM-DD')";
At the other end i'd like to read out startdate as a date var or format
it as I need.... (dd.mm.yyyy). Convert makes me confused... help
please?
Checkout the "mssql.datetimeconvert" option in PHP.INI.

Regards,
lucm

Dec 5 '06 #3

Sonnich wrote:
I read this and got confused...

I use PHP and got this:
$sql = "delete from blabla where startdate< =
to_date('2000.05.05','YYYY-MM-DD')";
$result=odbc_exec($conn, $sql);

Result: Warning: odbc_exec() [function.odbc-exec]: SQL error:
[Microsoft][ODBC SQL Server Driver][SQL Server]'to_date' is not a
recognized function name.

to_date should work?

At the other end i'd like to read out startdate as a date var or format
it as I need.... (dd.mm.yyyy). Convert makes me confused... help
please?

S
You should post at Oracle or Mysql forums

Madhivanan

Dec 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
3
by: praba kar | last post by:
Dear All, I have doubt regarding date string to time conversion function. In Python I cannot find flexible date string conversion function like php strtotime. I try to use following type...
15
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
4
by: Matteo | last post by:
Hy everybody. I'm not a html writer, but a sysadmin who's trying to help a user able to compile an online form with IE but not with Mozilla (Moz1.6, Ns7.1, Firefox 0.8+) due to a javascript date...
36
by: Martin Herrman | last post by:
Dear scripters, I am working on a HTML form in which a date must be entered of the form 'dd-mm-yyyy'. Now I'm looking for a script that, when the user switches to another form field, changes...
6
by: Jim Davis | last post by:
Before I reinvent the wheel I thought I'd ask: anybody got a code snippet that will convert the common ISO8601 date formats to a JS date? By "common" I mean at the least ones described in this...
3
by: Leo Muller | last post by:
Hi, Very often I have a problem with date formats. There are cases I have to cast the date to text and from text to date on a different server. However, sometimes the date formats on the servers...
9
by: Bob Achgill | last post by:
I would like to use the timestamp on files to manage the currency of support files for my VB windows application. In this case I would only put the timestamp of the file in the management database...
9
by: SOLVER | last post by:
Hi, I can't figure out why this is not working propelly: date("d.m.Y",strtotime("05/03/2008 00:00:00")); result: 03.05.2008 date("d.m.Y",strtotime("18/05/2008 00:00:00")); result:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.