#1 (permalink)  
Old 09-18-04, 04:36 AM
andyX andyX is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Question Date


I want to use the current date " print date ('M d, H:i') ; ". Submit this into a My SQL database No problem so far !
But then I want to use this date, to insert a new date into the database " 6 weeks or 42 days " forward of the current date that I already have.

This is so I can write a function to delete the record on the NEW data in 6 weeks. This bit I can do !
Its just creating the new date to put into the database.

Thanks AndyX
Reply With Quote
  #2 (permalink)  
Old 09-20-04, 01:38 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
this should give you the date 42days from now.. untested and might not work at all tho.. if it doesint work i hope it gives you some idea of how to make it
PHP Code:

$offset time() + (60*60*24*42);
print 
date ('M d, H:i'$offset) ; 
hope it helps
Wille
Reply With Quote
  #3 (permalink)  
Old 09-20-04, 01:37 PM
andyX andyX is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks Wille
That code looks like just the job !

Many thanks AndyX
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie found a solution to a date problem. mickey_kamer Perl 4 05-09-07 05:54 AM
the date() function or not??? Squid44th PHP 2 06-02-04 02:22 PM
Trouble inserting date into a field digitalje5u5 PHP 5 05-29-04 05:37 PM
Problem with date and form djavet PHP 3 05-02-04 12:37 AM
Date From Access 2000 Database Kaikki ASP 4 09-25-03 06:04 PM


All times are GMT -5. The time now is 04:30 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.