The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
The code below performs a select to display the hours of a timekeeper under certain conditions
Example Output: Date Hours
09/23/2019 7:30 12:00 14:00 17:00
24/09/2019 8:02 13:04
what the code needs to do is run the difference between out and in of each day and execute the sum, ie:
12:00 - 7:30 = 04:30
17:00 - 14:00 = 03:00
and execute the sum 03: 00 + 04: 30 = 07: 30
What I want to get is
<pre>select Data, string_agg(Ore, ' ') as Ore from(
select FORMAT(dateadd(minute, datediff(minute,0,DataCreazione) / 15 * 15, 0), 'dd/MM/yyyy', 'it-IT') as Data, CONCAT( (Case when Datepart(MINUTE, DataCreazione) > 45
Datepart(hour, Datacreazione) + 1 else Datepart(hour, Datacreazione) end),':' ,
(case when DATEPART(MINUTE, DataCreazione) between 0 and 15 and Stato = 'Ingresso' then '15'
when DATEPART(MINUTE, DataCreazione) between 16 and 30 and Stato = 'Ingresso' then '30' when DATEPART(MINUTE, DataCreazione)
between 31 and 45 and Stato = 'Ingresso' then '45' else '00' end)) as Ore
from Marcatura where
IdUtente = @IdUtente and(Stato = 'Ingresso' or Stato = 'Uscita') and
cast(DataCreazione as DateTime) between cast(CONVERT(VARCHAR(10), CONVERT(date, @Start, 5), 23) as datetime) and cast(CONVERT(VARCHAR(10), CONVERT(date, @End, 5), 23) as datetime) ) t group by Data order by CONVERT(datetime, Data, 105) desc
I've been using it since 1995, kept up with updates, and I'm currently running (still to this day) the final "sunset" edition MS published back in 2005. At this point it's basically free for all to download and use, with all the usual caveats that might entail.
These days I find myself tinkering with Power BI, and after getting used to what it can do, I'm starting to find MS Money's built-in reports somewhat..."lacking".
I otherwise like MS Money and don't necessarily want to transition/commit to something else. If I could just export its data every once in a while (even if manually) and refresh the data sources defined in Power BI to update any number of reports I might create, that'd probably be close to ideal...unfortunately, MS Money only allows exporting to what it calls "strict or loose" .QIF files. While Power BI can read from an impressive number of sources, QIF isn't one of them (and looking at their content, it probably shouldn't be expected to).
While QIF files seem readable enough, before I reinvent the wheel and try to convert into "something else" (exact details TBD)...has anyone come across anything that can either read MS Money files directly, or convert QIF files into some more common, spreadsheet (or DB) -like format(s)?