I'm trying to show total profit per year of publication, but my pubdate's are all in the full date format.
I tried this, but I doesn't quite work:
SELECT TO_CHAR(pubdate , 'YYYY') "Year Published", sum(quantity) * (retail - cost) "Total Profit"
FROM books JOIN orderitems USING(isbn)
GROUP BY pubdate, (retail-cost);
I get a Profit for each book, not each year, there are...
User Profile
Collapse
-
Of course as soon as I post something I find the answer to my own question. For anyones future reference I used:
Nights = System.DateTime .Compare(EndMon thCalendar.Sele ctionStart.Date , BegMonthCalenda r.SelectionStar t.Date)
With Nights being a integer I used for future calculations, and EndMonthCalenda r and BegMonthCalenda r being my Month Calendar Objects. -
**Sorry I'm new to the Forum, If this is in the wrong place***
I'm trying to use the MonthCalendar tool from the Common Controls Toolbox in Visual Studio. What is the code to use the date selected? I've searched, and all I can find is .TodayDate which is the actual current date or .SelectedRange which can't be converted into an integer. The toolbox says that it 'Displays a monthly calendar from which the user can select a date.' but...Leave a comment:
No activity results to display
Show More
Leave a comment: