Can someone help me with the correct sytax here !
I'm trying to show results from the last two days(or week etc)
This is what I've got
SELECT .
WHERE.
AND ( (DATE_SUB(j.stellen.t_stellen_date INTERVAL 2 day) <
j.stellen.t_stellen_date)
but it doesn't work !
What's wrong ?
The t_stelle
I have a date field in my mysql db, when I output the data to the screen, I
don't want to see the minutes, just the mmddyy. I can format a date but
can't seem to get it to work passing in the value from
$myrow["datefield"]any ideas? I don't want to have to worry about just
pulling what I want
Would someone help me with this ---
How do I get the results for 2 days before Easter Sunday from this ---
what do I have to do to my date statement to figure out Good Friday?
$good_Friday = date("Y-m-d", easter_date($current_year));
Hello,
I save the date in my MySQL db as 2001-03-25.
But in my PHP script i want do see it like 25-03-2001.
How do i get this result
thx
Is there a way that the default sql data base date -00-00 can be changed
using php?
Cheers
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PRO
if i unput the values 10/10/2001 into mysql database, would mysql or php
recognize that as a date??
i am a bit confused. i inserted few dates in the above format and asked
mysql to list them by date and it does not seem to work.
any suggestions?? please :)
ax
--
PHP Database Mailing List
how would i enter european format date into mysql (dd/mm/) ... and how
would i make the query sort by date if i am using this format ??
ax
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To con
How can a make a query that lists all the fields where a datefield as
the date of tomorow?
thanks
Hi All,
Is there any function in PHP4.X or in Oracle8i to calculate number of
Business days ( excluding Saturday and Sunday) between two given dates?
Thanks in advance.
Sridhar.
-Original Message-
From: qartis [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 1:38 PM
To: [EMAIL
Hi All,
I have a problem working out a suitable algorithm either in PHP or MySQL.
Basically I have a DB that keeps track of breeding records. Each record
has a paired data, and a split-up date.
I need to generate some statistics to work out average numbers of pairs
per month, averaged on a
i have an input field in a form that accept date called $date and in databse i made it
of type $date so its defualt is -00-00
the problem is when i say:
if($date!="-00-00")
{do something}
he doesn't understand $date!="-00-00"
Rehab M.Shouman
-
Does anyone know if the date function returns false if it cannot convert the
specified date/time to the format? If not, does anyone have a rule set they
use to verify the date is a valid convertible date? I need to update a row
in MSSQL, and it will fail if the date is incorrect. I've validated
Hi all,
If I have a feild called 'date' and the type is date when a form is
submitted isn't it suppose to automatically enter the date or do I need to
somehow enter it through the form?
The reason I ask is that I have another form with a date type and no
reference to it in the form and it is al
i get $postdate from my mysql database,the problem is that i want to increase that
date by 6 months??
its stored in mysql as date field
On Wednesday 22 May 2002 16:51, John Fishworld wrote:
> Can someone help me with the correct sytax here !
Please state which DB you're using. I assume it's MySQL.
> I'm trying to show results from the last two days(or week etc)
>
> This is what I've got
>
> SELECT .
> WHERE.
> AND ( (DAT
Sorry yes its MySQL
yes it was the missing comma causing the problem (thanks)
but now I get
You have an error in your SQL syntax near 'LIMIT 0, 30' at line 1
SELECT DISTINCT ..
WHERE (t_city.t_city_id_city = t_citystate.t_citystate_id_city)
AND (t_citystate.t_citystate_id_state = t_state.t_st
On Wednesday 22 May 2002 17:23, John Fishworld wrote:
> Sorry yes its MySQL
> yes it was the missing comma causing the problem (thanks)
> but now I get
> You have an error in your SQL syntax near 'LIMIT 0, 30' at line 1
> AND ((DATE_SUB(NOW(), INTERVAL 2 day) < j.stellen.t_stellen_date) LIMIT 0,
Duh found it !
AND ((DATE_SUB('NOW()', INTERVAL 2 day) < 'j.stellen.t_stellen_date')
should be
AND ( (DATE_SUB ('NOW()', INTERVAL 2 day) ) < 'j.stellen.t_stellen_date')
missing close bracket :-))
> On Wednesday 22 May 2002 17:23, John Fishworld wrote:
> > Sorry yes its MySQL
> > yes it was th
Hi there,
I would like to count the users out of a mysql db who registered after a
certain date.
The column I have in the db is a char and I do not want to change this
anymore.
This is how a typical entry looks like: May 29, 2002
This is how I tryed it:
// while '10...' is unix timestamp june
Hi there,
I would like to count the users out of a mysql db who registered after a
certain date.
The column I have in the db is a char and I do not want to change this
anymore.
This is how a typical entry looks like: May 29, 2002
This is how I tryed it:
// while '10...' is unix timestamp june
Dear all
I had a form which let user to input the leave_from and leave_to date into,
the format of the date that user input is "-mm-dd".
Now i want to compare the leave_from and leave_to date to find out the
number of days between!
What should i do or any function in php can provide this oper
Hi.
I want to know what is the right way to make some comparisons with date variables.
I have used only the date() function to get a variable in this format=> 01-07-2002
Is there a way to add 20 days in order to have 21-07-2002 or 2 months to have
01-09-2002?
Thanx in advance...
I thought I had this working, but it seems unfortunately not !!!
I'm trying to list events for each month and my select query is as follows
SELECT DISTINCT t_city_name,t_city_id_city FROM
t_city,t_zipcodecity,t_location,t_event WHERE (t_city_id_city =
t_zipcodecity_id_city) AND (t_zipcodecity_zi
hello,
in my script i want to compare input date with date stored in database and
want the result for date <= input date and sometime for date >= input date.
it didn't work for <= and >= operators. i also tried using "between" but it
didn't give desire result :-(
is there any other comparison
hi,
Is there any way I can get previous day's date, like we get
current
date by using getdate() or date() function. I mean is there some
in-built function in PHP which can subtract date to give me
yesterday's date.
I am currently calculating it using some code, which I have
written
and it is
hello
how can i calculate the difference in days between 2 dates in SQL or PHP ?
I have two fields of type date in a MySQL table called training:
start_date
end_date
I can format the date using a select, for example
SELECT
DATE_FORMAT(start_date, '%M %d, %Y') as start_date,
DATE_FORMAT(end_date, '%M %d, %Y') as end_date
FROM training
This
$date = date("m:d:y", $myrow[datefield]);
Will produce: 11:13:02
http://www.php.net/manual/en/function.date.php
Aaron
-Original Message-
From: Edward Peloke [mailto:epeloke@;echoman.com]
Sent: November 13, 2002 4:27 PM
To: Php-Db
Subject: [PHP-DB] date()
I have a date f
n.com]
Sent: Wednesday, November 13, 2002 3:27 PM
To: Php-Db
Subject: [PHP-DB] date()
I have a date field in my mysql db, when I output the data to the screen, I
don't want to see the minutes, just the mmddyy. I can format a date but
can't seem to get it to work passing in the value from
$m
If you don't want to change your SQL statement:
echo date ('Y/m/d', strtotime ($myrow['datefield']));
Marco
--
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Come visit us at http://www.phparch.com!
--- Begin M
On Thursday 14 November 2002 05:27, Edward Peloke wrote:
> I have a date field in my mysql db, when I output the data to the screen, I
> don't want to see the minutes, just the mmddyy.
DATE fields in MySQL don't have the time (h:m:s).
> I can format a date but
> can't seem to get it to work pas
When I use this, I get 12/31/69 as my date.
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 13, 2002 4:04 PM
To: 'Edward Peloke'; 'Php-Db'
Subject: RE: [PHP-DB] date()
$date = date("m:d:y", $myrow[datefield]);
ubject: RE: [PHP-DB] date()
When I use this, I get 12/31/69 as my date.
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 13, 2002 4:04 PM
To: 'Edward Peloke'; 'Php-Db'
Subject: RE: [PHP-DB] date()
$date = date("m:d:y",
eloke'; 'Php-Db'
Subject: RE: [PHP-DB] date()
Ok..
I guess it depends on how your date is stored. I always use
unix_timestamps.
If you are too.. then the format I supplied should work as indicated.
Aaron
-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sen
Sent: November 18, 2002 2:50 PM
To: 'Php-Db'
Subject: RE: [PHP-DB] date()
it is just a datetime field and the clients use a javascript calander to
pick the date, here is the exact date as it appears in the db.
2002-11-08 00:00:00
Eddie
-Original Message-
From: Aaron Wolski [mailto:[
On Tuesday 19 November 2002 03:26, Aaron Wolski wrote:
> Hmm.. I would get it into a unix_timestamp (unless someone can suggest a
> reasoning for now doing so).
It really depends on where you want to manipulate the dates. If mostly from
within MySQL then store with DATE, DATETIME & TIMESTAMP, if
11/18/2002 Subject: RE: [PHP-DB] date()
@Keane.com To: "'Edward Peloke'"
<[EMAIL PROTECTED]>
cc: "'Php-Db'" <[EMAIL PROTECTED]>
Hi there everyone,
I've never really used the date functions beyond getting it to store the
current date in a db.
I have a dilema in that I need to get all the days in the current month and
all the days in the next month (whatever the next month is depends on the
current month the script was ran)
Hi People,
Need some assistance in the following scenario:-
Inserting a date into the database that is entered into a form by the site
visitor. - This is easy enough.
However I now need to use the same date that has been entered by the site
visitor add 35 days and then insert into another table.
How can I query a MySQL table to get the latest results from a date field?
Basically, I am inserting several records at a time at the end of each week.
I want to have a page that displays the results for the last week only.
The date format in the field is -MM-DD
Hi all,
can someone kindly point me to a resource that converts all kinds of possible date
inputs into MySQL format of -MM-DD?
example of formats to be converted includes:
d/m/yy
d/m/
d/mm/yy
d/mm/yyy
dd/mm/yy
dd/mm/yyy
d/mmm/yy
d/mmm/
dd/mmm/yy
dd/mmm/
yy - 2 digit repre
I am having trouble converting a date from mm/dd/ to -mm-dd on a
user form. I know there was post about this, but I keep getting an
error message when I try to search the archives.
I have looked at the manual, but I am not finding what I am looking for.
Mark A. Bomgardner
Technolo
Hi
I am needing to convert a d/m/y date such as 30/11/2004 into the format that
mysql can use ie. 2004-11-20
If I try the following:
$testdate="30/11/2004";
echo date("Y-m-d", strtotime($testdate));
the result is - 2006-06-11
I can't find any other function apart from strtotime to do this.
An
Question:
I am trying to for the first time create a table with a column that is
defined as datetime
I wanted to populate that column with the date(r) command.
date(r) on my web site gives this response:
Fri, 9 Sep 2005 13:32:19 -0400
How may I manipulate date(r) to give a format which is comp
While I am rebuilding my crashed laptop (the machine that had all my
intelligence), I started thinking about a select statement I need.
I have log info in a table and want to extract it on a monthly basis. The
date field is in -mm-dd format. What's a good way to select those dates
that match 2
PHP 4.4/MySQL 4.0
I am tying to convert a date to put into a database from a string (ie:
January, February) to a numeric value (ie: 01,02). I am taking the
value from a form, which is a drop down menu listing the months.
$sMonth1 = $_POST['Smonth']; returns the money selected from the form.
Dear friends.
I have a date field in mysql called event_end .
I want to run a query to find all records where the event_and is greater
than today's date. I have written the following code. It does not work.
Please point out the mistake.
$today = getdate();
$sql="select * from events where eve
I'm having a problem with dates in php and mysql. I run a site that
promotes dated events and concerts and has the information for each
stored in a mysql database with the timestamp field.
Here is the function that checks the date of the event to ensure it is
between now and three weeks from now
This is a simple mysql question i am having problme with.
I have a table with name and birth date;
Joe | 1964-07-21
Mary | 1978-05-22
--
I want to get the name with birthdays in the month of July.
thanks
--
PHP Database Mailing List (http://www.php.net/)
To u
I'm having problems using SQL date functions with ODBC (unix).
I've browsed endless mailing lists and manuals but things that
seem to work for other people doesn't work on my setup.
I can get my IF statement in php working, but really need to have
the validation in the select statement. Other da
--MS_Mac_OE_3066812333_145812_MIME_Part
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
When I want to subtract a day from a date, and pass the date to a function
that will do the subtraction and then return the new value, so why does php
sometimes subtract the year, i
On Sun, Mar 25, 2001 at 03:02:21PM +0200, [EMAIL PROTECTED] wrote:
> I save the date in my MySQL db as 2001-03-25.
> But in my PHP script i want do see it like 25-03-2001.
> How do i get this result
if you can't modify the formart the date is safed as, you could
use split on the string that comes
In article <002f01c0b52b$d4778e00$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("[EMAIL PROTECTED]") wrote:
> I save the date in my MySQL db as 2001-03-25.
>
> But in my PHP script i want do see it like 25-03-2001.
Do it in the MySQL select. Assuming date_field is of field type 'date':
select date_
Hi,
I'm working on a event calendar and some events span more than one day. I would like
to store a date range like 2001-02-05 thru 2001-07-05 so when I do a query for the
current day the event would appear for all the days in the range. I hoping someone
can point me to some documentation or
Hi,
Can someone tell me how do stote date field in MySQL DB ?
Thanks,
Rosen M.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello all,
I'm on the last leg of a project I'm doing, and maybe I'm just too fried
but I've tried several things. Can anyone help:
I've created an Event Listing form. The script pulls the table names from
the DB and preg's them to create the field names for the form. Any field
name that contain
Friends,
I have a design, up and running scripts connected to MySQL.
How do I retrieve date formats and have it displayed as dd-mm- ?
I store them as DATE.
CK Raju
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
mysql date format is -MM-DD including the hyphens)
I usually use substr() to convert it from a user's entry to the format
reqd for the database
hth
Dave
-Original Message-
From: ax [mailto:[EMAIL PROTECTED]]
Sent: 18 October 2001 10:47
To: [EMAIL PROTECTED]
Subject: [PHP-DB]
depends on how you are entering data...
if through a client, then you have to format it as MYSQL wants it.
if you're going through PHP (afterall, this is a PHP DB list... ;-)),
then accept it anyway you wanna, through a form on a web page, then your
script will handle the convertion on how MYSQ
t;) AS edate FROM mytable ORDER BY edate;
With basic PHP, you can format the Euro date input into the script into the
-MM-DD requied for insertion into the database.
-Original Message-
From: ax [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 6:11 AM
To: [EMAIL PROTECTED]
S
User inserts date as a select menu for day, month and year: $day, $month, $year
You swap it around for an insert: $dateinsert = $year . $month . $day
Then query the DB: Select blah from blah where blah=blah order by datefield (Let MySQL
do the rest)
Good luck!
Russ
On Fri, 26 Oct 2001 12:10:51
gt; edate;
>
> With basic PHP, you can format the Euro date input into the script into
> the
> -MM-DD requied for insertion into the database.
>
> -Original Message-
> From: ax [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 26, 2001 6:11 AM
> To: [EMAIL PROTECT
Yes, PHP is nice. But the more we force MySQL to perform, the less is
required of PHP and the script writer.
-Original Message-
From: Steve Cayford [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 9:49 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] date
Check out the date
How do you get the date that is 14 days from today's date.
I am using PHP4 and MySQL. I can get that date with MySQL monitor but php. I
have tried many things but nothing works.
Does anyone give me a help?
Thank you.
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail
How do you get the date that is 14 days from today's date?
I can get that date with mysql monitor but PHP. I am using PHP4 and MySQL. I
have tried many things but nothing works.
Does anyone give me a help?
Thank you.
Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail
Hi
I need to store the date and time of sign-up and date
and time of last successful login in a mysql database
and calculate how long the user has been using a site.
how do i do this?
thanks in advance
Srinivasan
__
Do You Yahoo!?
Everything you'l
Hi there everyone,
I have the following 2 dates (FOr example):
19-02-2003
21-02-2003
How can I easily find out how many nights there are between the 2 dates? For example,
the above would be 2 nights as the 21st would be the checkout date.
I have the use the format about as that is how the in
go to mysql.com en look for date
-Original Message-
From: Jorge Miguel Fonseca Martins [mailto:[EMAIL PROTECTED]
Sent: vrijdag 28 februari 2003 16:23
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Date
How can a make a query that lists all the fields where a datefield as
the date of tomorow
I am looking for a way to take a date stored in a mysql database... and find
out the date seven days later.
how would i do this?!
cheers, dave
_
Chat online in real time with MSN Messenger http://messenger.msn.co.uk
--
PHP Data
I want to use it in this function that i am creating (it's for a resteraunt
automated tips system, to work out how much tips each staff member is
entitled to.
function tips($weekstart){
/* JUST BELOW HERE IS WHE
Hi there everyone,
I use the below code to grab the current date, convert it to a unix timestamp to do
some bits then it's supposed to change the date back with the new values (IE: current
date - x amount of seconds) but it's not doing it correctly, it's probably DEAD
obvious to everyone as my
Greetings,
I have some php code that pulls from the mysql database. Here it is:
";
while ($r = mysql_fetch_array($result)) {
$name = $r["name"];
$hyear = date('Y',$r["hdate"]);
$timein = $cyear - $hyear;
if ($timein > 0) {
echo
"$name$timein
Hi guys,
This might not be the best place for this but here goes.
I want to create a dropdown list with a date range of
--
Today
Yesterday
Fri 10/31
Thu 10/30
Wed 10/29
Tue 10/28
Mon 10/27
Sun 10/26
Sat 10/25
Fri 1
Sorry for what is probably going to be a late reply. I'm waiting to pick
someone up at the airport, and the plane was delayed, so I wanted to try my
hand at answering your question.
First I had to figure out what method you used to pick those dates in the
first place. It seems to be...
Today
Wow Garry,
I know that I like to kick-start my brain by getting 'into' a list problem/challenge
in the (London) mornings,
but today I'm completely beaten. Thanks for the broad explanation, which is probably
quite meaningful, but I'm
not into breeding (could that statement be misunderstood?) and
On Wed, 30 Jan 2002, DL Neil wrote:
>
> Can I request some db-speak please? You already have a tbl (or more).
> So let's start by asking for the table definitions
The table definition is as follows:
CREATE TABLE breeding (
rec SMALLINT(4) UNSIGNED AUTO_INCREMENT,
sire SMALLINT(4) UNSIGNED,
Garry,
I regret to say that I can't see an immediate answer.
> CREATE TABLE breeding (
> rec SMALLINT(4) UNSIGNED AUTO_INCREMENT,
> sire SMALLINT(4) UNSIGNED,
> dam SMALLINT(4) UNSIGNED,
> paired DATE,
> split DATE,
> num_offspring TINYINT(1) ZEROFILL,
> PRIMARY KEY (rec)
> );
>
> >
Garry,
Could you please explain (define) in one sentence(paragraph) what end
result you want. It might be possible to handle it in one SQL statement.
Miles Thompson
At 09:54 AM 1/30/2002 +1100, Garry Optland wrote:
>On Wed, 30 Jan 2002, DL Neil wrote:
>
> >
> > Can I request some db-speak plea
On Thu, 31 Jan 2002, DL Neil wrote:
> Garry,
> I regret to say that I can't see an immediate answer.
>
> > CREATE TABLE breeding (
> > rec SMALLINT(4) UNSIGNED AUTO_INCREMENT,
> > sire SMALLINT(4) UNSIGNED,
> > dam SMALLINT(4) UNSIGNED,
> > paired DATE,
> > split DATE,
> > num_offspr
Garry,
> > > CREATE TABLE breeding (
> > > rec SMALLINT(4) UNSIGNED AUTO_INCREMENT,
> > > sire SMALLINT(4) UNSIGNED,
> > > dam SMALLINT(4) UNSIGNED,
> > > paired DATE,
> > > split DATE,
> > > num_offspring TINYINT(1) ZEROFILL,
> > > PRIMARY KEY (rec)
> > > );
> > >
> > > First, we d
Rehab,
> i have an input field in a form that accept date called $date and in
databse i made it of type $date so its defualt is -00-00
>
> the problem is when i say:
> if($date!="-00-00")
> {do something}
>
> he doesn't understand $date!="-00-00"
Please copy-paste the actual error m
if( strcmp($date,"-00-00") )
{ do something}
-Original Message-
From: its me [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 12:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] date problem
i have an input field in a form that accept date called $date and in data
On Saturday 16 March 2002 00:14, Ryan Marrs wrote:
> Does anyone know if the date function returns false if it cannot convert
> the specified date/time to the format? If not, does anyone have a rule set
> they use to verify the date is a valid convertible date? I need to update
> a row in MSSQL,
> Does anyone know if the date function returns false if it cannot convert
the
> specified date/time to the format? If not, does anyone have a rule set
they
> use to verify the date is a valid convertible date? I need to update a
row
> in MSSQL, and it will fail if the date is incorrect. I've
// -Original Message-
// From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 4 April 2002 8:27 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Date Question
//
//
// Hi all,
//
// If I have a feild called 'date' and the type is date when a form is
// submitted isn
ifer Downey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 5:26 PM
Subject: [PHP-DB] Date Question
> Hi all,
>
> If I have a feild called 'date' and the type is date when a form is
> submitted isn't it suppose to automatical
> i get $postdate from my mysql database,the problem is that i want
> to increase that date by 6 months??
> its stored in mysql as date field
http://www.mysql.com/doc/D/a/Date_and_time_functions.html
check DATE_ADD :)
hth
pa
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe,
Hello dear all,
in my mysql-db I have a date_tbl with this format: (20020531).
how is possible in PHP do display date_tbl's values in a more human-readable
format like 05-31-2002 or 31/05/2002 ?
thaks in advance,
regards
fabrizio
--
PHP Database Mailing List (http://www.php.net/)
To
On Mon, 1 Jul 2002, Achilleas Maroulis wrote:
> Hi.
> I want to know what is the right way to make some comparisons with date variables.
> I have used only the date() function to get a variable in this format=> 01-07-2002
> Is there a way to add 20 days in order to have 21-07-2002 or 2 months to
Hi all:
Our company uses for reasons of experience, an INT(10) field for storing
dates in a MySQL DB. ((We just DO OK! ;-))
However I it is because the date isn't stored as a DATE or DATETIME
(etc) that I can't do an accurate ORDER BY - as
MySQL doesn't recognise the field's content as a valid d
Banging my head against a wall with this !
Hope someone can help !
Using MySQL
Trying to list cities with events for that month
I've correctly (i think) formatted my date to a datetime style for MySQL
$month is there chosen one
$tosearch = date("Y-$month-d 00:00:00");
And then this is my inq
maybe you should try
if($date!=="-00-00")
{do something}
"Dl Neil" <[EMAIL PROTECTED]> wrote in message
0df801c1cb3d$c947e420$c200a8c0@jrbrown">news:0df801c1cb3d$c947e420$c200a8c0@jrbrown...
> Rehab,
>
> > i have an input field in a form that accept date called $date and in
> databse i made i
Hi all!
I have got a "datetime" field in a MS-SQL DB, and I have a "date
field" in my html-form with the format: DD/MM/.
I would like to compare the two, but I think the two formats are a bit
different and they do not really want to be compared:)
If I write a query to write out the "datetim
On Wednesday 21 August 2002 21:28, Smita Manohar wrote:
> hello,
> in my script i want to compare input date with date stored in database and
> want the result for date <= input date and sometime for date >= input date.
How is the date stored? What type of field?
> it didn't work for <= and >= o
r page. That might not be what you
want. As I said before, I might have missed something, but that's what I
found out after looking for all of two minutes.
Rich
-Original Message-
From: Manoj Japher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 2:23 PM
To: [EMAIL PRO
On Thursday 22 August 2002 02:23, Manoj Japher wrote:
> hi,
> Is there any way I can get previous day's date, like we get
> current
> date by using getdate() or date() function. I mean is there some
> in-built function in PHP which can subtract date to give me
> yesterday's date.
> I am curren
Oh, in MySQL, there's also DATE_SUB(). Forgot to mention that one.
Rich
-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 2:40 PM
To: 'Manoj Japher'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Date Subtraction
Manoj,
J
PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Date Subtraction
hi,
hey you are bang on target. It did solve my problem.
Thanks a lot,
Manoj
On Wed, 21 Aug 2002 [EMAIL PROTECTED] wrote :
>
>if you really just want yesterday, i use date("Y-m-d", time() -
At 07:07 AM 9/20/02 -0500, Rankin, Randy wrote:
> SELECT
> DATE_FORMAT(start_date, '%M %d, %Y') as start_date,
> DATE_FORMAT(end_date, '%M %d, %Y') as end_date
> FROM training
>
>This produces the following:
>
> start_date: September 16, 2002
> end_date: Sepetember 20, 2001
1 - 100 of 282 matches
Mail list logo