{"id":89,"date":"2015-11-20T11:41:57","date_gmt":"2015-11-20T11:41:57","guid":{"rendered":"https:\/\/vining.in\/blog\/?p=89"},"modified":"2017-05-30T09:35:51","modified_gmt":"2017-05-30T09:35:51","slug":"how-to-store-date-with-hhmm-ampm-to-mysql","status":"publish","type":"post","link":"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/","title":{"rendered":"How to store date with HH,MM, AM\/PM to MySQL"},"content":{"rendered":"<p>Store AM PM time string into TIME or DATETIME datatype in MySQL and retrieve with AM PM while display?<\/p>\n<p>Save time as a regular 24 hour HH:MM:SS in the MySql time or datetime type. Do the formatting when executing query. Refer <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/date-and-time-functions.html#function_time-format\" target=\"_blank\">TIME_FORMAT()<\/a> to reformat it into AM\/PM format:<\/p>\n[snippet id=&#8221;24&#8243;]\n","protected":false},"excerpt":{"rendered":"<p>Store AM PM time string into TIME or DATETIME datatype in MySQL and retrieve with AM PM while display? Save time as a regular 24 hour HH:MM:SS in the MySql time or datetime type. Do the formatting when executing query. Refer TIME_FORMAT() to reformat it into AM\/PM format: [snippet id=&#8221;24&#8243;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[25],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-store-am-pm-in-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to store date with HH,MM, AM\/PM to MySQL<\/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:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to store date with HH,MM, AM\/PM to MySQL\" \/>\n<meta property=\"og:description\" content=\"Store AM PM time string into TIME or DATETIME datatype in MySQL and retrieve with AM PM while display? Save time as a regular 24 hour HH:MM:SS in the MySql time or datetime type. Do the formatting when executing query. Refer TIME_FORMAT() to reformat it into AM\/PM format: [snippet id=&#8221;24&#8243;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Programmer Code\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vining.in\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-20T11:41:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-05-30T09:35:51+00:00\" \/>\n<meta name=\"author\" content=\"codeadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"codeadmin\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/\",\"url\":\"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/\",\"name\":\"How to store date with HH,MM, AM\/PM to MySQL\",\"isPartOf\":{\"@id\":\"https:\/\/vining.in\/blog\/#website\"},\"datePublished\":\"2015-11-20T11:41:57+00:00\",\"dateModified\":\"2017-05-30T09:35:51+00:00\",\"author\":{\"@id\":\"https:\/\/vining.in\/blog\/#\/schema\/person\/cda9f07adf3479ac270e2320a914552e\"},\"breadcrumb\":{\"@id\":\"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vining.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to store date with HH,MM, AM\/PM to MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vining.in\/blog\/#website\",\"url\":\"https:\/\/vining.in\/blog\/\",\"name\":\"Programmer Code\",\"description\":\"- Where Developers Learn, Share, &amp; Build Careers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vining.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/vining.in\/blog\/#\/schema\/person\/cda9f07adf3479ac270e2320a914552e\",\"name\":\"codeadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vining.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/770f5bb2b95d41f98f29e7251fb1873b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/770f5bb2b95d41f98f29e7251fb1873b?s=96&d=mm&r=g\",\"caption\":\"codeadmin\"},\"url\":\"https:\/\/vining.in\/blog\/author\/codeadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to store date with HH,MM, AM\/PM to MySQL","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:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How to store date with HH,MM, AM\/PM to MySQL","og_description":"Store AM PM time string into TIME or DATETIME datatype in MySQL and retrieve with AM PM while display? Save time as a regular 24 hour HH:MM:SS in the MySql time or datetime type. Do the formatting when executing query. Refer TIME_FORMAT() to reformat it into AM\/PM format: [snippet id=&#8221;24&#8243;]","og_url":"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/","og_site_name":"Programmer Code","article_publisher":"https:\/\/www.facebook.com\/vining.in","article_published_time":"2015-11-20T11:41:57+00:00","article_modified_time":"2017-05-30T09:35:51+00:00","author":"codeadmin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"codeadmin"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/","url":"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/","name":"How to store date with HH,MM, AM\/PM to MySQL","isPartOf":{"@id":"https:\/\/vining.in\/blog\/#website"},"datePublished":"2015-11-20T11:41:57+00:00","dateModified":"2017-05-30T09:35:51+00:00","author":{"@id":"https:\/\/vining.in\/blog\/#\/schema\/person\/cda9f07adf3479ac270e2320a914552e"},"breadcrumb":{"@id":"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vining.in\/blog\/how-to-store-date-with-hhmm-ampm-to-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vining.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How to store date with HH,MM, AM\/PM to MySQL"}]},{"@type":"WebSite","@id":"https:\/\/vining.in\/blog\/#website","url":"https:\/\/vining.in\/blog\/","name":"Programmer Code","description":"- Where Developers Learn, Share, &amp; Build Careers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vining.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/vining.in\/blog\/#\/schema\/person\/cda9f07adf3479ac270e2320a914552e","name":"codeadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vining.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/770f5bb2b95d41f98f29e7251fb1873b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/770f5bb2b95d41f98f29e7251fb1873b?s=96&d=mm&r=g","caption":"codeadmin"},"url":"https:\/\/vining.in\/blog\/author\/codeadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":3,"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/posts\/89\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vining.in\/blog\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}