{"id":3775,"date":"2025-12-17T23:53:39","date_gmt":"2025-12-17T23:53:39","guid":{"rendered":"https:\/\/www.betmok.com\/blog\/?p=3775"},"modified":"2025-12-18T00:08:44","modified_gmt":"2025-12-18T00:08:44","slug":"sql-convert-changing-data-formats","status":"publish","type":"post","link":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/","title":{"rendered":"SQL convert: Changing Data Formats"},"content":{"rendered":"<p>In the world of databases, managing data isn&#8217;t just about storing and retrieving it \u2014 it also involves manipulating and transforming that data into a format that&#8217;s meaningful, consistent, and usable. Whether you&#8217;re building reports, creating APIs, or just cleaning up after messy imports, understanding how to convert data formats in SQL is a powerful tool every data professional should master.<\/p>\n<h2>TL;DR<\/h2>\n<p>SQL provides built-in functions like <b>CAST<\/b> and <b>CONVERT<\/b> that allow you to change data types to suit your application&#8217;s needs. These conversions are useful when dealing with dates, numbers, and strings, especially when transitioning between different systems or preparing clean reports. Understanding implicit vs. explicit conversions is crucial to avoid errors. Mastering type conversion makes your SQL queries more robust, cleaner, and widely compatible.<\/p>\n<h2>Why Convert Data Types in SQL?<\/h2>\n<p>Imagine you have a database with product prices stored as strings. You\u2019ll find it incredibly challenging to perform calculations, sorting, or any kind of analytics without first converting that data into a numeric type. Similarly, formatting a date stored as text into a real date helps streamline temporal queries and reporting.<\/p>\n<p>Here are some of the typical scenarios when you\u2019d want to convert data types in SQL:<\/p>\n<ul>\n<li>When importing data from external sources like CSVs or Excel files<\/li>\n<li>When cleaning data from inconsistent inputs<\/li>\n<li>When normalizing schemas for performance optimization<\/li>\n<li>When preparing data for presentation layers (like reports or dashboards)<\/li>\n<\/ul>\n<h2>Implicit vs. Explicit Conversion<\/h2>\n<p>SQL engines can sometimes automatically convert data \u2014 this is known as <i>implicit conversion<\/i>. For example, comparing a string to an integer might work because SQL quietly converts one to match the other in the background. However, this can lead to unexpected errors or inefficiencies.<\/p>\n<p>On the other hand, <i>explicit conversion<\/i> happens when you specifically instruct SQL to change a data type using conversion functions. It\u2019s a safer and clearer approach, especially in large codebases or production environments.<\/p>\n<h2>The <code>CAST()<\/code> Function<\/h2>\n<p><b>CAST<\/b> is part of the ANSI SQL standard and is supported in most relational databases, including SQL Server, PostgreSQL, MySQL, and Oracle.<\/p>\n<p><b>Syntax:<\/b><\/p>\n<pre><code>CAST(expression AS target_data_type)<\/code><\/pre>\n<p><b>Examples:<\/b><\/p>\n<ul>\n<li><code>CAST('2024-01-01' AS DATE)<\/code> \u2192 Converts a string into a date format.<\/li>\n<li><code>CAST(100.75 AS INT)<\/code> \u2192 Converts a decimal number into an integer (result: 100).<\/li>\n<\/ul>\n<p>The primary benefit of <b>CAST<\/b> is its portability across different types of SQL systems.<\/p>\n<h2>The <code>CONVERT()<\/code> Function<\/h2>\n<p>The <b>CONVERT<\/b> function is a bit more powerful than <b>CAST<\/b>, but it&#8217;s specific to SQL Server (and some other RDBMSs). It allows greater control, especially when formatting date and time values.<\/p>\n<p><b>Syntax:<\/b><\/p>\n<pre><code>CONVERT(target_data_type, expression [, style])<\/code><\/pre>\n<p><b>Examples:<\/b><\/p>\n<ul>\n<li><code>CONVERT(INT, '12345')<\/code> \u2192 Converts a string to an integer.<\/li>\n<li><code>CONVERT(VARCHAR, GETDATE(), 103)<\/code> \u2192 Converts today&#8217;s date into British format (dd\/mm\/yyyy).<\/li>\n<\/ul>\n<p>The optional \u201cstyle\u201d parameter is particularly helpful when working with regional date formats. SQL Server provides a range of style codes that control the output format of datetime conversions.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"1620\" src=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-person-sitting-at-a-desk-in-front-of-a-computer-sports-podcast-studio-microphones-modern-office-casual-hosts-recording.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-person-sitting-at-a-desk-in-front-of-a-computer-sports-podcast-studio-microphones-modern-office-casual-hosts-recording.jpg 1080w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-person-sitting-at-a-desk-in-front-of-a-computer-sports-podcast-studio-microphones-modern-office-casual-hosts-recording-200x300.jpg 200w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-person-sitting-at-a-desk-in-front-of-a-computer-sports-podcast-studio-microphones-modern-office-casual-hosts-recording-683x1024.jpg 683w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-person-sitting-at-a-desk-in-front-of-a-computer-sports-podcast-studio-microphones-modern-office-casual-hosts-recording-768x1152.jpg 768w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2026\/04\/a-person-sitting-at-a-desk-in-front-of-a-computer-sports-podcast-studio-microphones-modern-office-casual-hosts-recording-1024x1536.jpg 1024w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Converting Between Common Data Types<\/h2>\n<h3>1. String to Number<\/h3>\n<p>This is a frequent requirement, especially when ingesting data from CSVs and external resources where numbers are often enclosed in quotes. Use:<\/p>\n<pre><code>CAST('123.45' AS FLOAT)<\/code><\/pre>\n<p>or<\/p>\n<pre><code>CONVERT(NUMERIC(10,2), '123.45')<\/code><\/pre>\n<h3>2. Number to String<\/h3>\n<p>This is useful for display purposes:<\/p>\n<pre><code>CAST(300 AS VARCHAR)<\/code><\/pre>\n<h3>3. String to Date<\/h3>\n<p>Trickier, as the source string must match a recognizable date format. Use:<\/p>\n<pre><code>CAST('2024-06-10' AS DATE)<\/code><\/pre>\n<p>or, if using SQL Server with formatting:<\/p>\n<pre><code>CONVERT(DATETIME, '10\/06\/2024', 103)<\/code><\/pre>\n<h3>4. Date to String<\/h3>\n<pre><code>CAST(GETDATE() AS VARCHAR)<\/code><\/pre>\n<p>This is often used in logging or displaying information in UIs.<\/p>\n<h2>Handling Complex Scenarios<\/h2>\n<p>There are situations where data might not be in a clean format. For example, you may receive corrupted strings or numbers with commas (e.g., &#8220;1,200.50&#8221;). Attempting to convert without cleaning them first will result in errors.<\/p>\n<p><b>Tip:<\/b> Use functions like <code>REPLACE()<\/code> to pre-process values:<\/p>\n<pre><code>CAST(REPLACE('1,200.50', ',', '') AS DECIMAL(10, 2))<\/code><\/pre>\n<p>Always validate data before converting. Wrapping conversions in a <code>TRY_CAST()<\/code> or <code>TRY_CONVERT()<\/code> function (SQL Server) or using CASE statements to check type with regular expressions can avoid serious runtime errors.<\/p>\n<h2>Error Handling<\/h2>\n<p>In SQL Server, you can use the safer alternatives:<\/p>\n<ul>\n<li><code>TRY_CAST()<\/code><\/li>\n<li><code>TRY_CONVERT()<\/code><\/li>\n<\/ul>\n<p>These return <i>NULL<\/i> instead of throwing an error when a conversion fails, making them perfect for volatile datasets.<\/p>\n<pre><code>TRY_CAST('abc' AS INT)<\/code><\/pre>\n<p>The above will return NULL instead of breaking your query.<\/p>\n<h2>Performance Matters<\/h2>\n<p>While casting and converting are powerful, they can also be <i>CPU-intensive<\/i> when applied across millions of rows. Furthermore, using conversions in WHERE clauses on indexed columns can prevent SQL from using the index, severely degrading performance.<\/p>\n<p>Instead of this:<\/p>\n<pre><code>WHERE CAST(created_at AS DATE) = '2024-06-10'<\/code><\/pre>\n<p>Try this:<\/p>\n<pre><code>WHERE created_at &gt;= '2024-06-10' AND created_at &lt; '2024-06-11'<\/code><\/pre>\n<p>This approach lets SQL optimize better without type conversions on indexed columns.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"607\" src=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/12\/a-black-and-white-photo-of-three-coffee-mugs-sql-performance-query-optimization-indexing-data-types.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/12\/a-black-and-white-photo-of-three-coffee-mugs-sql-performance-query-optimization-indexing-data-types.jpg 1080w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/12\/a-black-and-white-photo-of-three-coffee-mugs-sql-performance-query-optimization-indexing-data-types-300x169.jpg 300w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/12\/a-black-and-white-photo-of-three-coffee-mugs-sql-performance-query-optimization-indexing-data-types-1024x576.jpg 1024w, https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/12\/a-black-and-white-photo-of-three-coffee-mugs-sql-performance-query-optimization-indexing-data-types-768x432.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Use Cases Across Different Database Systems<\/h2>\n<p>Almost all databases support type conversion, but syntax and features vary:<\/p>\n<ul>\n<li><b>PostgreSQL:<\/b> Use <code>::<\/code> syntax \u2014 <code>'123'::int<\/code><\/li>\n<li><b>MySQL:<\/b> Offers <code>CAST()<\/code> and uses <code>STR_TO_DATE()<\/code> for date conversions<\/li>\n<li><b>Oracle:<\/b> Heavily uses <code>TO_CHAR()<\/code> and <code>TO_DATE()<\/code><\/li>\n<li><b>SQL Server:<\/b> Offers <code>CAST()<\/code>, <code>CONVERT()<\/code>, <code>TRY_CAST()<\/code>, etc.<\/li>\n<\/ul>\n<p>If you&#8217;re writing cross-platform SQL, prefer using <b>CAST<\/b> for better compatibility, and leave database-specific formatting to the presentation layer if possible.<\/p>\n<h2>Best Practices<\/h2>\n<p>Here are some tips to keep in mind:<\/p>\n<ul>\n<li><b>Validate first:<\/b> Always check if your data is clean and fits the target type.<\/li>\n<li><b>Use the right precision:<\/b> When converting to types like <code>DECIMAL<\/code>, specify precision to avoid decimal drop-offs.<\/li>\n<li><b>Avoid unnecessary conversion in WHERE clauses:<\/b> They can kill your performance.<\/li>\n<li><b>Think about nullables:<\/b> Converting <code>NULL<\/code> behaves differently across types\u2014check results.<\/li>\n<li><b>When in doubt, default to CAST:<\/b> It\u2019s more cross-platform than CONVERT.<\/li>\n<\/ul>\n<h2>Final Thoughts<\/h2>\n<p>Data conversion in SQL is a cornerstone concept that enhances your ability to write safer, cleaner, and more powerful queries. Whether you&#8217;re cleaning up a dataset, building transformations for a pipeline, or just trying to fix a weird import error, becoming<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":52,"featured_media":3634,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[465],"tags":[],"class_list":["post-3775","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL convert: Changing Data Formats - Betmok Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL convert: Changing Data Formats - Betmok Blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/\" \/>\n<meta property=\"og:site_name\" content=\"Betmok Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-17T23:53:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-18T00:08:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"715\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jake Colins\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jake Colins\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/\"},\"author\":{\"name\":\"Jake Colins\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b\"},\"headline\":\"SQL convert: Changing Data Formats\",\"datePublished\":\"2025-12-17T23:53:39+00:00\",\"dateModified\":\"2025-12-18T00:08:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/\"},\"wordCount\":887,\"publisher\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/\",\"url\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/\",\"name\":\"SQL convert: Changing Data Formats - Betmok Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg\",\"datePublished\":\"2025-12-17T23:53:39+00:00\",\"dateModified\":\"2025-12-18T00:08:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage\",\"url\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg\",\"contentUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg\",\"width\":1080,\"height\":715},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.betmok.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL convert: Changing Data Formats\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#website\",\"url\":\"https:\/\/www.betmok.com\/blog\/\",\"name\":\"Betmok Blog\",\"description\":\"All about football\",\"publisher\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.betmok.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#organization\",\"name\":\"Betmok Blog\",\"url\":\"https:\/\/www.betmok.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png\",\"contentUrl\":\"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png\",\"width\":96,\"height\":96,\"caption\":\"Betmok Blog\"},\"image\":{\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b\",\"name\":\"Jake Colins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g\",\"caption\":\"Jake Colins\"},\"description\":\"I'm Jake Collins, a tech journalist covering the latest in AI and robotics. My goal is to demystify advanced technologies for a broader audience.\",\"url\":\"https:\/\/www.betmok.com\/blog\/author\/jakec\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL convert: Changing Data Formats - Betmok Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/","og_locale":"en_US","og_type":"article","og_title":"SQL convert: Changing Data Formats - Betmok Blog","og_url":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/","og_site_name":"Betmok Blog","article_published_time":"2025-12-17T23:53:39+00:00","article_modified_time":"2025-12-18T00:08:44+00:00","og_image":[{"width":1080,"height":715,"url":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg","type":"image\/jpeg"}],"author":"Jake Colins","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jake Colins","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#article","isPartOf":{"@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/"},"author":{"name":"Jake Colins","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b"},"headline":"SQL convert: Changing Data Formats","datePublished":"2025-12-17T23:53:39+00:00","dateModified":"2025-12-18T00:08:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/"},"wordCount":887,"publisher":{"@id":"https:\/\/www.betmok.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage"},"thumbnailUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg","articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/","url":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/","name":"SQL convert: Changing Data Formats - Betmok Blog","isPartOf":{"@id":"https:\/\/www.betmok.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage"},"image":{"@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage"},"thumbnailUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg","datePublished":"2025-12-17T23:53:39+00:00","dateModified":"2025-12-18T00:08:44+00:00","breadcrumb":{"@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#primaryimage","url":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg","contentUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2025\/11\/woman-in-white-shirt-riding-on-brown-horse-during-daytime-equestria-girls-cast-friendship-magic-portal-1.jpg","width":1080,"height":715},{"@type":"BreadcrumbList","@id":"https:\/\/www.betmok.com\/blog\/2025\/12\/17\/sql-convert-changing-data-formats\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.betmok.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL convert: Changing Data Formats"}]},{"@type":"WebSite","@id":"https:\/\/www.betmok.com\/blog\/#website","url":"https:\/\/www.betmok.com\/blog\/","name":"Betmok Blog","description":"All about football","publisher":{"@id":"https:\/\/www.betmok.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.betmok.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.betmok.com\/blog\/#organization","name":"Betmok Blog","url":"https:\/\/www.betmok.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png","contentUrl":"https:\/\/www.betmok.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-96x96-1.png","width":96,"height":96,"caption":"Betmok Blog"},"image":{"@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/75c79688d4fc04146184d75325f5b06b","name":"Jake Colins","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.betmok.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d7f1881fe3b69808c760f302d4f15c1f83e1e13ef0c73e72728f605bff57d2af?s=96&d=mm&r=g","caption":"Jake Colins"},"description":"I'm Jake Collins, a tech journalist covering the latest in AI and robotics. My goal is to demystify advanced technologies for a broader audience.","url":"https:\/\/www.betmok.com\/blog\/author\/jakec\/"}]}},"_links":{"self":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts\/3775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/comments?post=3775"}],"version-history":[{"count":1,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts\/3775\/revisions"}],"predecessor-version":[{"id":3797,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/posts\/3775\/revisions\/3797"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/media\/3634"}],"wp:attachment":[{"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/media?parent=3775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/categories?post=3775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betmok.com\/blog\/wp-json\/wp\/v2\/tags?post=3775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}