Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 180891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:39:56+00:00 2026-05-11T14:39:56+00:00

i have a date in this format May 30 2006 12:00AM is there a

  • 0

i have a date in this format

May 30 2006 12:00AM

is there a equivalent of strtotime() in mysql that will let me convert this to a mysql date?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:39:57+00:00Added an answer on May 11, 2026 at 2:39 pm

    I think you are looking for the STR_TO_DATE function. Unfortunately, it is not quite as awesome as PHP’s strtotime, so you have to give it a format mask to parse:

    mysql> SELECT STR_TO_DATE('04/31/2004', '%m/%d/%Y');         -> '2004-04-31' 

    For your date, I think the mask would be %M %e %Y %l:%i%p, depending on whether or not you are expecting short/long month names and 0-based days. Based on your example it could be either:

    mysql> SELECT STR_TO_DATE('May 30 2006 12:00AM', '%M %e %Y %l:%i%p'); +--------------------------------------------------------+ | STR_TO_DATE('May 30 2006 12:00AM', '%M %e %Y %l:%i%p') | +--------------------------------------------------------+ | 2006-05-30 00:00:00                                    | +--------------------------------------------------------+ 1 row in set (0.00 sec) 

    Check out the full reference table for the mask options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code that converts an array of date strings from a format
I have a list of items that are in this format: 05/01 – Some
I have to put my database's data in this format (values will differ, obviously),
I have a date in this format 030512 (ddmmyy). But I'm having trouble with
I have one date like 12/05/2012 now i would like to change that format
Have String str May 23 2011 12:20:00, want to convert it to date such
I have a mysql table that relies on the unix epoch time stamp equivalent
I have a date format pattern: MMM yyyy And want that: if the month
I have to convert date format in to mm-dd-yyyy I don't know what is
I have a date picker for text field which puts in format of 5-MAY-2011

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.