<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQL week format issue its not showing result as 01(ww) in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/145112#M52456</link>
    <description>&lt;P&gt;What Is Papa’s Freezeria?&lt;BR /&gt;Papa’s Freezeria is part of the famous Papa Louie game series, where players take on the role of restaurant employees running one of Papa Louie’s many eateries.&amp;nbsp;&lt;A href="http://papasfreezeria.online/" target="_blank"&gt;http://papasfreezeria.online/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jan 2026 14:22:31 GMT</pubDate>
    <dc:creator>Fowlkes</dc:creator>
    <dc:date>2026-01-24T14:22:31Z</dc:date>
    <item>
      <title>SQL week format issue its not showing result as 01(ww)</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/33957#M24832</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;I've requirement to show the week number as ww format. Please see the below code&lt;/P&gt;&lt;P&gt;select weekofyear(date_add(to_date(current_date, 'yyyyMMdd'), +35)). also plz refre the screen shot for result.&lt;span class="lia-inline-image-display-wrapper" image-alt="result"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2267i38E2616D29041CC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="result" alt="result" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 16:45:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/33957#M24832</guid>
      <dc:creator>Ericsson</dc:creator>
      <dc:date>2021-12-01T16:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL week format issue its not showing result as 01(ww)</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/33958#M24833</link>
      <description>&lt;P&gt;date_add id adding days. Today is 1st December and +35 days it gives 5th January which is first week of 2022 so result 1 is correct as returned by weekofyear function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need just add leading zero the best way is to format it in visualization tool like / BI.&lt;/P&gt;&lt;P&gt;If you need leading zero in spark it will be have to be the string:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT lpad(weekofyear(date_add(current_date, 35)), 2, '0')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It could be nice that date object is just format (date_format) as week number WW/ww but in spark is not included in date formatting: &lt;A href="https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html" target="test_blank"&gt;https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 17:36:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/33958#M24833</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2021-12-01T17:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: SQL week format issue its not showing result as 01(ww)</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/33959#M24834</link>
      <description>&lt;P&gt;You can use &lt;A href="https://spark.apache.org/docs/latest/api/sql/index.html#lpad" alt="https://spark.apache.org/docs/latest/api/sql/index.html#lpad" target="_blank"&gt;lpad()&lt;/A&gt; to achieve the 'ww' format.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 18:33:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/33959#M24834</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2021-12-01T18:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: SQL week format issue its not showing result as 01(ww)</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/145112#M52456</link>
      <description>&lt;P&gt;What Is Papa’s Freezeria?&lt;BR /&gt;Papa’s Freezeria is part of the famous Papa Louie game series, where players take on the role of restaurant employees running one of Papa Louie’s many eateries.&amp;nbsp;&lt;A href="http://papasfreezeria.online/" target="_blank"&gt;http://papasfreezeria.online/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jan 2026 14:22:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-week-format-issue-its-not-showing-result-as-01-ww/m-p/145112#M52456</guid>
      <dc:creator>Fowlkes</dc:creator>
      <dc:date>2026-01-24T14:22:31Z</dc:date>
    </item>
  </channel>
</rss>

