<div dir="ltr"><div><div>How about:<br><br>let $d1 := xs:date("2014-03-02")<br>let $d2 := xs:date("2014-04-21")<br>let $days:=0 to days-from-duration($d2 - $d1)<br>return $days!($d1+ . *xs:dayTimeDuration('P1D'))<br>
<br></div>Cheers<br></div>/Andy<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 12, 2014 at 9:58 PM, Jakob Fix <span dir="ltr"><<a href="mailto:jakob.fix@gmail.com" target="_blank">jakob.fix@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>I have a "sparse sequence" of dates that I'd like to pad with the missing ones.<br>
<br>So I thought I'd find the min and the max dates, create a sequence from min to max and then create a union with the existing sequence and get the distinct values.<br>

<br>unfortunately, creating a sequence of dates doesn't seem that simple. This:<br><br>let $d1 := xs:date("2014-03-01")<br>let $d2 := xs:date("2014-03-31")<br>return ($d1 to $d2)<br><br>doesn't work. There is probably a way to create a recursive function using durations, but maybe it's just me not seeing the forest because of all the tress...<br>


<br>cheers,<br>Jakob.</div>
<br>_______________________________________________<br>
<a href="mailto:talk@x-query.com">talk@x-query.com</a><br>
<a href="http://x-query.com/mailman/listinfo/talk" target="_blank">http://x-query.com/mailman/listinfo/talk</a><br></blockquote></div><br></div>