<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — SQL search dates, From Sunday to Saturday, and count the dates]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=9657</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=9657&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in SQL search dates, From Sunday to Saturday, and count the dates.]]></description>
		<lastBuildDate>Sun, 12 Jul 2026 00:30:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53942#p53942</link>
			<description><![CDATA[<p>If you attach the latest version of your project I can have a quick look.<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 12 Jul 2026 00:30:08 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53942#p53942</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53941#p53941</link>
			<description><![CDATA[<p>Hi Derek</p><p>I tried the simple option 1,&nbsp; checked line per line, double checked...compared your code with mine on Microsoft word to make sure they were identical (except for the reference to the databases columns). And still can&#039;t get it to work. </p><p>I even thought it could be the date format, so I added a date dd/mm/yyyy field from my initial date field that is&nbsp; yyyy/MM/dd. And still nothing.</p><p>At least I don&#039;t get an error message.</p><p>Any theories to help me out ?</p>]]></description>
			<author><![CDATA[null@example.com (jeffmtl@hotmail.com)]]></author>
			<pubDate>Sat, 11 Jul 2026 22:53:51 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53941#p53941</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53917#p53917</link>
			<description><![CDATA[<p>Most of the calculated fields were because I was trying to second-guess where you might want to go with the project (and to give the functionality of Option 3 in the previous attachment).<br />But if the basic option does all you want, then you only need a single calculated field (see attached) which simplifies things a lot (and gives you the weekend off - LOL!!).<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sat, 04 Jul 2026 11:48:28 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53917#p53917</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53916#p53916</link>
			<description><![CDATA[<p>Thank you Derek</p><p>That is exactly what I was looking for. The basic version is perfect.</p><p>Now comes the fun part—I need to take some time to go through it piece by piece, understand what you did, and see how all the parts connect together. From what I can tell already, there&#039;s a real elegance in its clean simplicity.</p><p>Looks like I have a great weekend project ahead of me. Thanks again!</p>]]></description>
			<author><![CDATA[null@example.com (jeffmtl@hotmail.com)]]></author>
			<pubDate>Sat, 04 Jul 2026 10:49:56 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53916#p53916</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53915#p53915</link>
			<description><![CDATA[<p>Hi Jeff,<br />Sorry for the delay - life keeps getting in the way <img src="https://myvisualdatabase.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />As others have indicated, there are quite a few different approaches you could take.<br />But as always, I take the easy road (!) and would just use calculated fields.<br />Have a look at the attachment that has 3 options<br />Option 1<br />Most straightforward - a summary grid showing closed files (by week) sits side by side with the main grid that holds all the individual details.<br />Option 2<br />A variation on the above - the summary grid is hidden until you click the relevant button (click it again to hide).<br />Option 3<br />Again, a summary grid and a main grid.&nbsp; This time, click any row in the summary grid and it filters the rows in the main grid (the gridlines also turn red as a visual reminder that a filter is active).&nbsp; Click another row in the summary grid to see a different set of filtered results.&nbsp; Clicking a second time on the filtered row clears all the filters, displays all the rows in the main grid and resets the gridlines back to black.<br />I created a &#039;calendar&#039; table to hold &#039;weekstart&#039; (Monday) and weekend&#039; (Sunday) dates just to simplify things (and also to future-proof for any possible extra requirements).&nbsp; Note that the &#039;calendar&#039; table was simply populated by copy and paste from Excel (it was quickest) rather than add extra code to the script.<br />I didn&#039;t do anything on the report side of things as I don&#039;t know if you want to report everything or just weekly summaries of closed files.&nbsp; But the raw data is all there so it should be pretty straightforward.<br />Hope this helps,<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sat, 04 Jul 2026 07:24:44 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53915#p53915</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53911#p53911</link>
			<description><![CDATA[<p>Here you are..sorry.</p>]]></description>
			<author><![CDATA[null@example.com (jeffmtl@hotmail.com)]]></author>
			<pubDate>Fri, 03 Jul 2026 15:24:52 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53911#p53911</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53909#p53909</link>
			<description><![CDATA[<p>Nothing seems to have been uploaded.<br />Can you try again.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Fri, 03 Jul 2026 10:08:21 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53909#p53909</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53908#p53908</link>
			<description><![CDATA[<p>Here you are...Note that the amount I put in for the grid is just random. I didnt count each accurately from my table.</p>]]></description>
			<author><![CDATA[null@example.com (jeffmtl@hotmail.com)]]></author>
			<pubDate>Fri, 03 Jul 2026 01:32:24 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53908#p53908</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53907#p53907</link>
			<description><![CDATA[<p>Hi Jeff,<br />Can you re-load your attachment - nothing&#039;s come through.<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Thu, 02 Jul 2026 23:37:32 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53907#p53907</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53906#p53906</link>
			<description><![CDATA[<p>Here is a mock of what I want to do, very simple. Note my creative EXCEL image for what I want the report to look like. I also would like to either print on excel or FAST REPORT.</p><p>tks</p>]]></description>
			<author><![CDATA[null@example.com (jeffmtl@hotmail.com)]]></author>
			<pubDate>Thu, 02 Jul 2026 22:33:26 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53906#p53906</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53905#p53905</link>
			<description><![CDATA[<p>I will attempt to make a small mock of the tables and forms.&nbsp; Please do not pay attention to my script put up earlier. Its what the internet suggested and I wasn&#039;t going anywhere with it, simply because it was deep in code and I couldnt make heads or tails of it.</p><p>Be right back !</p>]]></description>
			<author><![CDATA[null@example.com (jeffmtl@hotmail.com)]]></author>
			<pubDate>Thu, 02 Jul 2026 22:08:45 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53905#p53905</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53904#p53904</link>
			<description><![CDATA[<p>Your solution contains several errors:<br />- The table&#039;s sqlValue property is intended to retrieve the ID. ( <a href="https://myvisualdatabase.com/help_en/script_tablegrid.html">https://myvisualdatabase.com/help_en/sc … egrid.html</a> )<br />- The SQLExecute function is intended to retrieve a single value in a query, such as a record ID, date, or quantity. To process multiple records, use the SQLQuery function.<br />- Everything you&#039;re trying to do can be accomplished using standard MVD tools, using a calculated field ( <a href="https://myvisualdatabase.com/help_en/Datatypes.html">https://myvisualdatabase.com/help_en/Datatypes.html</a> ) or by using the &quot;SQL query&quot; button if you prefer to write queries manually.. ( <a href="https://myvisualdatabase.com/help_en/SQLquery.html">https://myvisualdatabase.com/help_en/SQLquery.html</a> )</p>]]></description>
			<author><![CDATA[null@example.com (sparrow)]]></author>
			<pubDate>Thu, 02 Jul 2026 21:41:03 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53904#p53904</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53903#p53903</link>
			<description><![CDATA[<p>It&#039;s difficult to give a good answer without having access to your database but as far as what I see in the query is that the table you are querying does not match the description you give in the 2nd paragraph. </p><p>You might also need to update the sqlite.dll to get access to some functions which do not exist in the already old version of MyVisualDatabase.</p>]]></description>
			<author><![CDATA[null@example.com (tcoton)]]></author>
			<pubDate>Thu, 02 Jul 2026 19:43:22 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53903#p53903</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53901#p53901</link>
			<description><![CDATA[<p>Hi Jeff,<br />Can you attach your project?<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Thu, 02 Jul 2026 09:33:43 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53901#p53901</guid>
		</item>
		<item>
			<title><![CDATA[SQL search dates, From Sunday to Saturday, and count the dates]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=53900#p53900</link>
			<description><![CDATA[<p>Hi everybody</p><p>I am attempting to do an SQL SEARCH such that I have a list of dates indicating the closure of client files. The quary is to see how many files have been closed during week periods. So that you could see that on any given weeks the quantity closed.</p><p> FROM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TO&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QTY<br />2026-01-01&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2026-01-07&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;32<br />2026-01-08&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2026-01-14&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;12</p><br /><p>Best I could manage with the little program and help from the net was the below, but i keep getting blocked : </p><p>table : reference<br />column : Datecompletion<br />grid :&nbsp; reports.Gridperformance&nbsp; &nbsp; &nbsp; &nbsp;(and the property i think is sqlvalue)</p><p>Any help would be amazing cause im starting to loose my mind.</p><p>Tks. </p><br /><br /><p>reports.GridPerformance.sqlValue := SQLExecute(<br />&nbsp; &nbsp; &#039;SELECT &#039; +<br />&nbsp; &nbsp; &#039;&nbsp; &nbsp; date(DateCompletion, &#039;&#039;-&#039;&#039; || ((strftime(&#039;&#039;%w&#039;&#039;, DateCompletion)+6) % 7) || &#039;&#039; days&#039;&#039;) AS week_monday, &#039; +<br />&nbsp; &nbsp; &#039;&nbsp; &nbsp; COUNT(*) AS total_in_week &#039; +<br />&nbsp; &nbsp; &#039;FROM referalDb &#039; +<br />&nbsp; &nbsp; &#039;GROUP BY week_monday &#039; +<br />&nbsp; &nbsp; &#039;ORDER BY week_monday;&#039;<br />);</p>]]></description>
			<author><![CDATA[null@example.com (jeffmtl@hotmail.com)]]></author>
			<pubDate>Thu, 02 Jul 2026 04:06:30 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=53900#p53900</guid>
		</item>
	</channel>
</rss>
