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 8770037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:28:38+00:00 2026-06-13T17:28:38+00:00

I have to migrate an Access database to MySQL. I have two problems: first

  • 0

I have to migrate an Access database to MySQL. I have two problems: first is year is specified with two digits; second is that this is a birthday database. For example I have strings like this:

"06/12/76 00:00:00"
"10/15/02 00:00:00"

Which year is refering last one (October 15th)? I’ll assume that all dates which have a year value over 12 are refering to 19XX and the other (from 0 to 12) to this century: 20XX.

Once resolved this problem I need to format these dates. I’ve try this:

$bd = strtotime($birth);
if ($bd > time()) {
    $bd = strtotime("-100 years", $bd);
}
$birth = sua_date_unix2mysql($bd);

But the problem is strtotime only is able to manage dates after 1970. Any idea to resolve this problem?

NOTE: Datetime is not available (version 5.2)

  • 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. Editorial Team
    Editorial Team
    2026-06-13T17:28:39+00:00Added an answer on June 13, 2026 at 5:28 pm

    Just manipulate those dates as strings.

    // "06/12/76 00:00:00"
    list($month, $day, $year) = explode('/', $birth);
    // $year is actually "76 00:00:00"...
    $year = (int)$year;
    
    $century = 2000;
    if (($century + $year) > date('Y'))
        $century = 1900;
    $year += $century;
    $mysql = "$year-$month-$day"; // 19760612 will be recognized by MySQL
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to migrate information that I created in SQLite3 to a MySQL database
I have an old Access database that is basically one flat file. I want
I have an application that is successfully deploying on tomcat, which I must migrate
I have an Access database currently. There is a backend, and there are multiple
i have a snapshot of the database that I took before i did some
i have a asp.net mvc webpage that queries a SQL server database for contact
I'm one of those that recently decided to migrate from MySQL to PostgreSQL and
I am writing code to migrate data from our live Access database to a
I need to migrate some data from one MYSQL database to another but the
We have a large MS Access project that requires GUI functionality that is difficult

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.