Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

MySQL Date operators

Posted on 2013-06-24
4
383 Views
Last Modified: 2013-06-24
I am creating a view and need to restrict the record set to a greater or equal to a date.

I am using below but is returning all

select        
        `tblpermit`.`PermitIssueDate` AS `PermitIssueDate`
    from
        `tblpermit`
    where
        (`tblpermit`.`PermitIssueDate` >= ((6 / 19) / 2013))

Open in new window


The date format on the returned records is long time
0
Comment
Question by:Brogrim
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39271251
select        
        `tblpermit`.`PermitIssueDate` AS `PermitIssueDate`
    from
        `tblpermit`
    where
        `tblpermit`.`PermitIssueDate` >= '6 /19/ 2013'

Open in new window

0
 

Author Comment

by:Brogrim
ID: 39271319
Not working.

the date format returned are 2010-07-01 00:00:00
0
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39271352
Use same date format in your query and later you can format date:
select        
        `tblpermit`.`PermitIssueDate` AS `PermitIssueDate`
    from
        `tblpermit`
    where
        `tblpermit`.`PermitIssueDate` >= ' 2010-07-01'

Open in new window

0
 

Author Closing Comment

by:Brogrim
ID: 39271376
Thanks
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
problems with mysql ODBC Connector and vbscript 4 39
Help With Simple Database Design 7 50
Uploading a CSV Data Import via PHP & MySql 3 29
issue with DB import 1 17
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question