<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Tahoma,Arial,Helvetica,sans-serif'>
<p><span>Hi Miquel,</span></p>
<p><br /></p>
<p><span>Using similar with substring but how would I integrate that with this code. I've tried Ryan's function but it is throwing an error up somewhere and i've yet to find it. Thanks in advance. And thanks to Ryan as well. </span></p>
<p><span>regards,</span></p>
<p><span>Stuart. </span></p>
<p><br /></p>
<p>'query time'<br />time = subwrd(result,3)<br />day = subwrd(result,6)<br />datestr = subwrd (result, 3)<br />if (substr (datestr, 3, 1) = 'Z') ; zptr = 3 ; ;else ; zptr = 6 ; endif ;<br />timestr = substr (datestr, 1, 2)<br />date = substr (datestr, zptr+1, 99)<br />dd = substr (date, 1, 2)<br />mmm = substr (date, 3, 3)<br />yyyy = substr (date, 6, 4)</p>
<p>if (mmm = 'JAN') ; mm = 01 ; endif<br />if (mmm = 'FEB') ; mm = 02 ; endif<br />if (mmm = 'MAR') ; mm = 03 ; endif<br />if (mmm = 'APR') ; mm = 04 ; endif<br />if (mmm = 'MAY') ; mm = 05 ; endif<br />if (mmm = 'JUN') ; mm = 06 ; endif<br />if (mmm = 'JUL') ; mm = 07 ; endif<br />if (mmm = 'AUG') ; mm = 08 ; endif<br />if (mmm = 'SEP') ; mm = 09 ; endif<br />if (mmm = 'OCT') ; mm = 10 ; endif<br />if (mmm = 'NOV') ; mm = 11 ; endif<br />if (mmm = 'DEC') ; mm = 12 ; endif</p>
<p>date = day' 'dd'/'mm' 'timestr':00'</p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p>On 22-12-2020 16:01, Miquel Bernis wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">
<div>I'm dealing with the same problem. Using substr() you can split day (d), month (m), and year (y), and after that this algorithm looks like works for me. Returns 0 for a Sunday and up to 6 for a Saturday.</div>
<div> </div>
<div>arrayDOW.0=0<br />arrayDOW.1=3<br />arrayDOW.2=2<br />arrayDOW.3=5 <br />arrayDOW.4=0<br />arrayDOW.5=3<br />arrayDOW.6=5<br />arrayDOW.7=1<br />arrayDOW.8=4<br />arrayDOW.9=6 <br />arrayDOW.10=2<br />arrayDOW.11=4</div>
<div> </div>
if (m<3)<br />y=y-1<br />endif<br /><br />parm=m-1<br />dofweek = math_mod((y + math_int(y/4) - math_int(y/100) + math_int(y/400) + arrayDOW.parm + d),7)</div>
<br />
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">Missatge de CW Weather <<a href="mailto:weatherstu@chorleyweather.com">weatherstu@chorleyweather.com</a>> del dia dt., 22 de des. 2020 a les 8:07:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">
<div style="font-size: 10pt; font-family: Tahoma,Arial,Helvetica,sans-serif;">
<p>Hello Users, </p>
<p><br /></p>
<p>I know this subject has been covered recently with an issue with the date for 2021, with the DAY returning '???'. Is there a suitable work around on this for both grads and opengrads users? I know there is a work around with some of you <span>implementing Zeller's congruence but alas I have no idea how to code or where to code it to. </span></p>
<p><br /></p>
<p><span>Any help on the matter would be greatly apricated. </span></p>
<div>-- <br />
<p>Kind regards,</p>
<p><strong>Stuart Markham</strong></p>
<p><em><img src="cid:16086542865fe21dce9e5df873675913@chorleyweather.com" width="78" height="51" /></em></p>
<p><em>Founder of CW Weather</em></p>
<p><em>Website: <a href="https://www.chorleyweather.com/" target="_blank" rel="noopener noreferrer">chorleyweather.com</a></em></p>
</div>
</div>
_______________________________________________<br /> gradsusr mailing list<br /><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br /><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank" rel="noopener noreferrer">http://gradsusr.org/mailman/listinfo/gradsusr</a></blockquote>
</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> gradsusr mailing list<br /><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br /><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank" rel="noopener noreferrer">http://gradsusr.org/mailman/listinfo/gradsusr</a></div>
</blockquote>
<p><br /></p>
<div>-- <br />
<p>Kind regards,</p>
<p><strong>Stuart Markham</strong></p>
<p><em><img src="cid:6b66f0ed98388166210072475f549d2c@chorleyweather.com" width="78" height="51" /></em></p>
<p><em>Founder of CW Weather</em></p>
<p><em>Website: <a href="https://www.chorleyweather.com/">chorleyweather.com</a></em></p>
</div>
</body></html>