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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:55:52+00:00 2026-05-15T00:55:52+00:00

I have date in dd/mm/yyyy format. How can I store it in a database,

  • 0

I have date in dd/mm/yyyy format. How can I store it in a database, if I want to do some operations on it afterwards?

For example, I must find out the rows, where date > something. What type I must set for the date field?

  • 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-05-15T00:55:52+00:00Added an answer on May 15, 2026 at 12:55 am

    To store dates or times in MySQL use date, datetime or timestamp. I’d recommend the first two for most purposes.

    To tell MySQL how to parse your date format use the STR_TO_DATE function. Here’s an example:

    CREATE TABLE table1 (`Date` Date);
    INSERT INTO table1 (`Date`) VALUES (STR_TO_DATE('01/05/2010', '%m/%d/%Y'));
    SELECT * FROM table1;
    
    Date
    2010-01-05
    

    To format the results back into the original form look at the DATE_FORMAT function. Note that you only need to format it if you want to display it as a string using something other than the default format.

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

Sidebar

Related Questions

I have table with one of the columns as date in 'YYYY-MM-DD' format. Can
I have date in sting object in following format. dd/mm/yyyy I want to change
I have a date in String format, mm/dd/yyyy I want to convert this to
i want to compare database field of date that has YYYY-MM-DD format and i
I have used a textbox to store a date in DD-MM-YYYY format and since
I have a database field where date is stored as DD/MM/YYYY format. Now what
Input Date Format DD-MM-YYYY Example 15-01-2012 I have a booking date stored in Session
I have date of Birth of the format 04/08/2010(DD/MM/YYYY) and sql server store of
I have a date being passed to my script in the format as yyyy-mm-dd.
I have the need to display a date in this format: dd/mm/yyyy. This is

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.