Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa SQL SQL date query
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sunil Kumar Verma
SQL date query
1 Answer(s)      2 years and 7 months ago
Posted in : SQL


how to get ( 15 march 2011) and (15/03/2011) output using SQL


Advertisement
View Answers

April 11, 2012 at 1:35 PM


Use the following queries to get the data from database in the given format.

For (15 march 2011) format:

SELECT DATE_FORMAT(dob, '%d %M %Y') FROM patient;

For (15/03/2011) format:

SELECT DATE_FORMAT(dob, '%d/%m/%Y') FROM patient;

where patient is our table name and dob is a field of date type.



Related Tutorials/Questions & Answers:
SQL date query
SQL date query  how to get ( 15 march 2011) and (15/03/2011) output using SQL   Use the following queries to get the data from database in the given format. For (15 march 2011) format: SELECT DATE_FORMAT(dob, '%d %M
SQL display date in between query
SQL display date in between query  how to get ( 15 march 2011) and (15/03/2011) output using SQL
Advertisements
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
sql query
sql query  two tables are emp,loc write a query to display all the emp information whose locname not equal to bangalore
sql query
sql query  hi friend, Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need sql query plz help to me
Sql Query
Sql Query  Hi M Navjeet Ghai I want to know How to Show A name(Like Navjeet Ghai And Manpreet Singh Sodhi) of employees from a employee table as N.Ghai & M.S.Sodhi by using sql query
sql query
sql query  hi friend, Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need sql query plz help to me
sql query
sql query  hi friend, Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need sql query plz help to me
SQL Query
SQL Query  Selecting the third highest salary of Employee without using any subquery?   Here is a query: SELECT salary FROM employee ORDER BY salary DESC LIMIT 2,1
SQL QUERY
SQL QUERY  am a having a table 'PROGRAMMER' with columns... C pascal Bhanu Sql... Pascal Sql Mahesh DBASE Cobol
sql query
sql query  SQL QUERY BROWSER declare @cout00 int declare @cout01 int declare @cout10 int declare @cout11 int declare @c1 float declare @gss float...); this is the query i have written for the table "dpscomp" - station date month
SQL Query - SQL
SQL Query  Hi I would like to know how to create a SQL query which would copy values from a field which contains multiple values to an existing... | +-----+-----------+-------------+ Query: INSERT INTO table2 (fruit1, fruit2, fruit3
query - SQL
tell me how to write the query in database but not jsp code. thank u
SQL query
SQL query  I need to combine two tables in order to get the values. As an example we have three tables having namely usertable,job table and jobaccess table. In usertable (Userid,Empid,name,Role) details have been stored
SQL query - SQL
SQL query  hi sir/Madam i am using MS Access where i have table like Fees_Struc: Amount (INT) Due_Date (Date) Fees_Pay: Paid(INT) Student_Bal: Panalty(INT) my problem is when the Due_date is equal
upgrading sql query join
upgrading sql query join  upgrading sql query join
sql query - SQL
sql query  hi sir,i have a month and year numbers,when i am enter a month and year in sql query then i want results for 1st day of month to last day of month in that year for that month plz provide a solution
optimize sql query
optimize sql query  How to optimize sql query in mysql? Thanks
sql query - JDBC
sql query  I need a SQL query to add data into database
SQl Date
SQL Date       The SQL Date is used when you are working with dates. This include...; in the database. The query contain only the date portion, which you want
Select today's date sql
Select today's date sql   I wanted to show the data from database according to the current date. So, can anyone give me the select today's date sql query? Thanks!   select current date in mysql query select * from
SQL QUERY ERROR
SQL QUERY ERROR  Im writing a query which shows error of INVALID CHARACTER The Query is Insert into PMST_EMP_MST(PMSNUM_EMP_ID,PMSSTR_EMP_NAME,PMSDT_DOB_DATE,PMSSTR_GENDER,PMSNUM_DESIGNATION_CODE,PMSNUM_CDAC_EMPID
display sql query in hibernate
display sql query in hibernate  If you want to see the Hibernate generated SQL statements on console, what should we do
SQL QUERY - JDBC
SQL QUERY  I m running a query using apache tomcat the sql query is on adding an employee in the database whenever i click on add after inserting the values i am getting a java.lang.nullpointer exception
Hibernate SQL Query/Native Query
This tutorial describes Hibernate SQL Query, which is also known as Native Query
Sql query from oracle
Sql query from oracle  Please help me that I want to get the table names form the existing database who does it having eid coloumn plz provide me query in oracle database
Date related query - Date Calendar
Date related query  hi, m a new biginner of java.i m intrested... user using bufferedReader. how can i convert a string into a date object.pls... Date { public static void main(String ar[]) { Date d1=new Date
Mysql Date Query
Mysql Date Query       Mysql Date Query Date Query is used to return the current date, month and year... 'Mysql Date Query'. To understand this example we use current_date query
date range in sql
date range in sql  How can I select a random date from a date range in SQL server
Named ? SQL query in hibernate
Named ? SQL query in hibernate  What is Named SQL query in hibernate... putting the sql queries to various places in between code. sample.hbm.xml <...;/property> </class> <query name="getProductByCode">
Advertisements
 

 

 

DMCA.com