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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:41:07+00:00 2026-06-05T01:41:07+00:00

I stored with dates in this format 6th July,2012 in my table. I want

  • 0

I stored with dates in this format 6th July,2012 in my table. I want to loop through them and send an email to the admin if the date is today’s date.
i tried this but think i need to concert the date format first.

SELECT email, name, phone_no FROM table WHERE TO_DAYS(date)=To_DAYS(NOW());
 If true then send email to admin.
 //eg. John's birthday is today. Pls call him on 00001332424;

Thanks

  • 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-05T01:41:08+00:00Added an answer on June 5, 2026 at 1:41 am

    Yes, you should convert to native mysql date/time formats first. Storing as a date as a string is all fine and dandy if you never have to manipulate that date. But as soon as you do, then you’re in for a world of pain – can’t uses indexes, have to convert every string EVERY TIME you run a query, etc…

    Once you’ve converted that string to a native date field, then it’s a simple matter of

    SELECT .... WHERE datefield=CURDATE();
    

    To give you an idea what’s possible once you’ve got your dates in ‘native’ format, here’s the mysql date/time manipulation functions: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html

    there’s lots of them, but almost all only work on native date fields, not on arbitrary strings (except the ones that convert string<->native).

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

Sidebar

Related Questions

In my table dates are stored in the format 2010-08-26 09:00:00 so yyyy-mm-dd. I'd
I am seeeing my dates are stored in database in this format for a
In my table, dates are stored like this: 2011-03-03T13:30:00 I'm trying to output dates
My dates are stored in this format: 3-1-2011 3-15-2011 However, it seems to be
In one of my Mysql database table the dates are stored in the format
My MySQL database table has dates stored in the MySQL format (YYYY-MM-DD). I need
In my application the dates are stored in ISODate format: ISODate(2012-04-21T07: 32: 16.285Z) What
Ok, I need something like this: datediff(second, date_one, date_two) < 1 dates are stored
I have a table with 5 million records of dates stored as char(10) with
I got a file which has dates stored as the following format (yyyy|dMM|dd). I

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.