[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Date Formula Grouping

Posted on 2012-09-05
3
Medium Priority
?
487 Views
Last Modified: 2012-09-05
I have a report that displays reads by date and I wnat to create a group by year.

example

1/1/2012   945
2/2/2012   968
3/3/2012   980......etc.  report has dates for 2009-2012

Now I want to group by the year......if, then, else?  

Thank you.
0
Comment
Question by:washvt
3 Comments
 
LVL 9

Accepted Solution

by:
Evan Cutler earned 1000 total points
ID: 38369796
Try this:

SELECT
Year(Date) as Year,
sum(data) as int
from table1
where Year(Date) between 2009 and 2012
group by Year(Date)
0
 
LVL 12

Expert Comment

by:Jared_S
ID: 38369840
As long as your date is formatted as a date, create a formula as

year({example.date}), add it to your report, and group by it.

If your date is a string, then use year(date({example.date})) instead.
0
 

Author Closing Comment

by:washvt
ID: 38369990
Thank you
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question