<?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 Bypassdata conversion in snowflake python connector in RUCKUS Cloud</title>
    <link>https://community.ruckuswireless.com/t5/RUCKUS-Cloud/Bypassdata-conversion-in-snowflake-python-connector/m-p/56154#M1007</link>
    <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;Have a question regarding data conversion in snowflake connector for python. I have some timestamp data in Snowflake and I am retrieving it with python connector. I want the timestamp data to be in string format not in datetime.datetime format.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Tue, 04 Apr 2023 11:21:18 GMT</pubDate>
    <dc:creator>digitalspecz</dc:creator>
    <dc:date>2023-04-04T11:21:18Z</dc:date>
    <item>
      <title>Bypassdata conversion in snowflake python connector</title>
      <link>https://community.ruckuswireless.com/t5/RUCKUS-Cloud/Bypassdata-conversion-in-snowflake-python-connector/m-p/56154#M1007</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;Have a question regarding data conversion in snowflake connector for python. I have some timestamp data in Snowflake and I am retrieving it with python connector. I want the timestamp data to be in string format not in datetime.datetime format.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Apr 2023 11:21:18 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/RUCKUS-Cloud/Bypassdata-conversion-in-snowflake-python-connector/m-p/56154#M1007</guid>
      <dc:creator>digitalspecz</dc:creator>
      <dc:date>2023-04-04T11:21:18Z</dc:date>
    </item>
    <item>
      <title>Bypassdata conversion in snowflake python connector</title>
      <link>https://community.ruckuswireless.com/t5/RUCKUS-Cloud/Bypassdata-conversion-in-snowflake-python-connector/m-p/56177#M1008</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;SPAN class=""&gt;&lt;A class="" href="https://community.ruckuswireless.com/t5/user/viewprofilepage/user-id/18388" target="_self"&gt;&lt;SPAN class=""&gt;digitalspecz&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;, t&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;hanks for your question!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To convert a timestamp in &lt;/SPAN&gt;&lt;STRONG&gt;datetime.datetime&lt;/STRONG&gt;&lt;SPAN&gt; format to a &lt;STRONG&gt;string&lt;/STRONG&gt; format in Python, you can use the &lt;/SPAN&gt;&lt;STRONG&gt;strftime()&lt;/STRONG&gt;&lt;SPAN&gt; method. Here's an example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import snowflake.connector

# Establish a connection to Snowflake
conn = snowflake.connector.connect(
user='YOUR_USER',
password='YOUR_PASSWORD',
account='YOUR_ACCOUNT',
warehouse='YOUR_WAREHOUSE',
database='YOUR_DATABASE',
schema='YOUR_SCHEMA'
)

# Create a cursor object
cursor = conn.cursor()

# Retrieve the timestamp data as datetime objects
cursor.execute('SELECT timestamp_col FROM your_table')

# Retrieve the timestamp data as strings
timestamp_data = [row[0].strftime('%Y-%m-%d %H:%M:%S.%f') for row in cursor.fetchall()]

# Close the cursor and connection
cursor.close()
conn.close()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;strftime()&lt;/STRONG&gt;&lt;SPAN&gt; method is used to convert the &lt;/SPAN&gt;datetime.datetime&lt;SPAN&gt; object to a string format. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can adjust the format string to match the specific string format you want to convert the timestamp to.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 21:27:54 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/RUCKUS-Cloud/Bypassdata-conversion-in-snowflake-python-connector/m-p/56177#M1008</guid>
      <dc:creator>abiel_bermudez</dc:creator>
      <dc:date>2023-04-04T21:27:54Z</dc:date>
    </item>
  </channel>
</rss>

