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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:10:50+00:00 2026-06-01T02:10:50+00:00

I have a datepicker on my site. When you select a date, it displays

  • 0

I have a datepicker on my site. When you select a date, it displays as dd/mm/yyyy

In order to search the date, the mysql db has to be similar to it

But it looks like yyyy-mm-dd H:i:s which I cant search for

Edit
I also wanted to search between two dates but was having difficulty since the two formats were different

My question was, how would I format my search function to find a similarity from the datepicker and the mysql datetime?

Here’s what I have so far (date_avialable is the column name)

$sql = mysql_query("SELECT * FROM search_v WHERE Currency='$currency' AND rout_to='$sto' AND

rout_from='$sfrom' AND DATE_FORMAT(date_avialable,'%Y-%m-%d') BETWEEN '$sfromda' AND 'stoda' LIMIT 10") or die(mysql_error()) ;
while ( $runrows = mysql_fetch_array($sql))

I wanted to do something like this

$mysqldate = date( 'Y-m-d H:i:s', $phpdate );
$phpdate = strtotime( $mysqldate );

But didn’t know how to call that into the db

  • 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-01T02:10:52+00:00Added an answer on June 1, 2026 at 2:10 am

    If your specification in question are correct try (to change) this in your code..

    AND DATE_FORMAT(date_avialable,'%d-%m-%Y')
    

    or separate your PICKER date to strings shown bellow on the left and do this

    AND ($calendarday) = date_format(from_unixtime(date_avialable),'%d')
    AND ($calendarmonth) = date_format(from_unixtime(date_avialable),'%m')
    AND ($calendaryear) = date_format(from_unixtime(date_avialable),'%Y')
    

    If that aint gonna work, please go to phpmyadmin, and try to tell us what is the format of date in your “date_avialable” row. Is it a unix timestamp or d-m-Y or similar..

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

Sidebar

Related Questions

I've have finally got the datepicker to work on my MVC demo site. One
I have a DatePicker working on a View which also has a ViewModel associated
I currently have the DatePicker in my project but there are problems due to
I have a jquery datepicker which is renders the current date by default as
On my site, I want to have a date range thing, so I figured
I have 2 textboxes on my site for pickup date and drop off date
I have a link to a page on my site that has a data
I have datepicker, but I could not find a way to validate if the
I am trying to use DatePicker in my site. I have a main.css and
I have a datepicker input that is populated with today's date when the page

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.