473,394 Members | 1,841 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,394 software developers and data experts.

date operations

Hi,
Are there operator for dates, I need a stuff like this
dateX = today - x days

Thanks
Jul 17 '05 #1
4 6718
toufik toufik a écrit le 27/02/2004 :
Hi,
Are there operator for dates, I need a stuff like this
dateX = today - x days

Thanks


If in database, use SQL statements otherwise see manual for date() and
mktime() functions.
http://www.php.net
Jul 17 '05 #2
toufik toufik wrote:
Are there operator for dates, I need a stuff like this
dateX = today - x days


if today (shouldn't it be $today?) is a Unix timestamp, do

$dateX = $today - $x * (24*60*60);
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #3
Bob
Try this: DATE_ADD(now(), INTERVAL-5 MINUTE) (if you wanna to have it
in a mysql query!)


Pedro Graca <he****@hotpop.com> wrote in message news:<c1*************@ID-203069.news.uni-berlin.de>...
toufik toufik wrote:
Are there operator for dates, I need a stuff like this
dateX = today - x days


if today (shouldn't it be $today?) is a Unix timestamp, do

$dateX = $today - $x * (24*60*60);

Jul 17 '05 #4
"toufik toufik" <to*****@sympatico.ca> wrote in message news:<m8********************@news20.bellglobal.com >...
Hi,
Are there operator for dates, I need a stuff like this
dateX = today - x days


http://www.phpinsider.com/php/code/Date_Calc/

--
"Success is not what you achieve, but it is what you die for"
If you live in USA, please support John Edwards.
Email: rrjanbiah-at-Y!com
Jul 17 '05 #5

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

Similar topics

20
by: rhino | last post by:
This worked before October now it does not work. I think I know where the trouble is but I don't know how to fix it. function findVerse() { var d = new Date(); var str; if( (...
3
by: KK | last post by:
Hi, How can we convert string to date in VB.NET? I will get date in a string "5/24/2005" By using date operations I want to convert this date into another string "24-May-2005". Not by using...
20
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
7
by: mr.nimz | last post by:
hello, this is antenio. recently i've come to a problem. i got a way through it, somehow, still it left me in a curious state, so i'm posting it here, if i can get an answer from some techy, ...
8
by: Grey | last post by:
I have following problem: table includes times for startup and end of operation as datetime field related to daily shift operations: dateid date starttime endtime 458 2006-12-29 22:00 ...
4
by: perryclisbee via AccessMonster.com | last post by:
I have dates of service for several people that range all over each month. ie: patient had dates of service of: 7/3/2006, 7/24/2006 and 7/25/2006. I need to create a new field via a query that...
2
by: gstark | last post by:
Hi, I have a difference between machines in the date formats they produce. This one web application has this code. Me.txtRxDate.Text = Now().ToShortDateString. On the development server, the...
1
by: sabby | last post by:
I have been trying without success to use the code to show the proper time and date. How can i use the code that shows the date and use it in logic operations. for example if i wanted to allow...
10
by: WebCM | last post by:
There is a function: http://paste.ubuntu.com/21865 It needs GMT date in YYYY-MM-DD HH:MM:SS format - in SQL: datetime. If date is the same as today, the function returns "Today". There is one...
7
by: kr151080 | last post by:
Ok so I am messing around with a program and have no idea how to go about doing this but here is the code for the class date.... public class Date { private int dMonth; private int dDay;...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.