Jump to content


Photo

date functions in MySQL


  • Please log in to reply
1 reply to this topic

#1 marco-marco

marco-marco
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 15 November 2003 - 10:38 PM

there is a function \"mysql> dayofyear(\'2003-08-01\')\" which will return the value \"213\". Is there a way of entering \"213\" and getting \"2003-08-01\" ??

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 16 November 2003 - 06:04 PM

You could use

DATEADD (2002-12-31, 213 DAYS)
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users