MySQL Forums
Forum List  »  Delphi

DayofYear Function
Posted by: Alexis Esrajel Dagmil
Date: February 18, 2014 01:39AM

Good Day!

I want to have a query that will filter the DayOfYear of a certain date and continue the dayofyear value to the next year. Lets say i have this values in the table :

my query is
select mydate, myvalue, dayofyear(mydate) from table

MyDate MyValue DayOfYear(Date)
---------------------------------------- ---------------
December 30, 2012 780 365
December 30, 2013 1,400 364
December 31, 2013 3,300 365
January 1, 2014 1,100 1
January 1, 2013 800 1

when the date is already January 1, 2014 the DOYValue will continue to 366 instead of 1.

then i want to get the average of the myvalue with the 366 DayOfYear instead of using DayOfYear 1 value.

Hope you got my point, Thanks in advance.

Options: ReplyQuote

Written By
DayofYear Function
February 18, 2014 01:39AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.