<?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 Date Formats while extracting data from Cosmos Mongo DB using Azure Databricks. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/date-formats-while-extracting-data-from-cosmos-mongo-db-using/m-p/22339#M15292</link>
    <description>&lt;P&gt;I have been trying to extract one date field from cosmos which looks like as below:&lt;/P&gt;&lt;P&gt;&lt;B&gt;"lastModifiedDate"&amp;nbsp;:&amp;nbsp;{&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"$date"&amp;nbsp;:&amp;nbsp;1668443121840&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/B&gt;&lt;/P&gt;&lt;P&gt;when the above field is extracted using Databricks it gets converted into a date format which looks like this: &lt;B&gt;2022-11-14T16:25:21.840+0000&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would want to keep the date format as is in Cosmos in the epoch/unix timestamp as this is important for the incremental extraction.&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;I would like to know is there any pyspark function to convert date format: &lt;B&gt;2022-11-14T16:25:21.840+0000&lt;/B&gt; back to &lt;B&gt;1668443121840&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! in advance&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 07:28:46 GMT</pubDate>
    <dc:creator>Swapnil1998</dc:creator>
    <dc:date>2022-11-15T07:28:46Z</dc:date>
    <item>
      <title>Date Formats while extracting data from Cosmos Mongo DB using Azure Databricks.</title>
      <link>https://community.databricks.com/t5/data-engineering/date-formats-while-extracting-data-from-cosmos-mongo-db-using/m-p/22339#M15292</link>
      <description>&lt;P&gt;I have been trying to extract one date field from cosmos which looks like as below:&lt;/P&gt;&lt;P&gt;&lt;B&gt;"lastModifiedDate"&amp;nbsp;:&amp;nbsp;{&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"$date"&amp;nbsp;:&amp;nbsp;1668443121840&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/B&gt;&lt;/P&gt;&lt;P&gt;when the above field is extracted using Databricks it gets converted into a date format which looks like this: &lt;B&gt;2022-11-14T16:25:21.840+0000&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would want to keep the date format as is in Cosmos in the epoch/unix timestamp as this is important for the incremental extraction.&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;I would like to know is there any pyspark function to convert date format: &lt;B&gt;2022-11-14T16:25:21.840+0000&lt;/B&gt; back to &lt;B&gt;1668443121840&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! in advance&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 07:28:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/date-formats-while-extracting-data-from-cosmos-mongo-db-using/m-p/22339#M15292</guid>
      <dc:creator>Swapnil1998</dc:creator>
      <dc:date>2022-11-15T07:28:46Z</dc:date>
    </item>
  </channel>
</rss>

