SQL date query

SQL date query

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

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.

Ads









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
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
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 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
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 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  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
date range in sql
date range in sql  How can I select a random date from a date range in SQL server
upgrading sql query join
upgrading sql query join  upgrading sql query join
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 Between Date
SQL Between Date       The Tutorial help you to understand SQL Between Date. In this Tutorial..._Table (Stu_Id varchar(2), Stu_Name varchar(15), Stu_Dob date); Insert Data
optimize sql query
optimize sql query  How to optimize sql query in mysql? Thanks
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
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 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
SQL get start date and end date result
SQL get start date and end date result  how to get ( 15 march 2011) and (15/03/2011) output using SQL
Hibernate SQL Query/Native Query
This tutorial describes Hibernate SQL Query, which is also known as Native Query
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
ModuleNotFoundError: No module named 'date-query'
ModuleNotFoundError: No module named 'date-query'  Hi, My Python... 'date-query' How to remove the ModuleNotFoundError: No module named 'date... have to install padas library. You can install date-query python
Sql Date Conversion
Sql Date Conversion       The Tutorial illustrate an example from 'Sql Date Conversion... the Year from the date you specified. Query:- SELECT DATE
Update SQL Query Example
Update SQL Query Example  Hi, I am beginner in SQL (MySQL) and trying to learn Update SQL Query with Example code. Can anyone explain me the SQL Update query with an example code? Thanks   Hi, A simple example
jtable query compare with date
jtable query compare with date  how to transfer daytable data to monthtable when complete a month
SQL Date
SQL Date         The SQL Date is used when you are working with dates. This include... column  in the database. The query contain only the date portion, which
jtable query compare with date
jtable query compare with date  how to transfer daytable data to monthtable when complete a month Hello Sir, I am developing a desktop application in which i have to display database records in jtable .now I want to transfer
jtable query compare with date
jtable query compare with date  how to transfer daytable data to monthtable when complete a month Hello Sir, I am developing a desktop application in which i have to display database records in jtable .now I want to transfer
jtable query compare with date
jtable query compare with date  how to transfer daytable data to monthtable when complete a month Hello Sir, I am developing a desktop application in which i have to display database records in jtable .now I want to transfer
sql query search function
sql query search function  i have a textbox on a form , i like a search a data in the form, when i give whatever name and id or etc..its will search and show the same form , so help me using jsp
Sql Date and Time Format
Sql Date and Time Format       The Tutorial illustrate an example from the 'Sql Date and Time... by AM or PM) Query:- The given below Date_Format(date,format) Query
Mysql Date Format
. The Tutorial helps you to write the Date Format in SQL Querydate_format(now( ),'%e %M%W%Y') : This Query is used to display the current date, month, week and year.  Query for formatting currentdate:- mysql> select date
Hibernate Native SQL Query Introduction
In this section, you will learn Hibernate Native SQL query
ModuleNotFoundError: No module named 'sql-query'
ModuleNotFoundError: No module named 'sql-query'  Hi, My Python... 'sql-query' How to remove the ModuleNotFoundError: No module named 'sql... have to install padas library. You can install sql-query python with following
Mysql Date Quarter
Mysql Date Quarter       Mysql Date Quarter is a query in SQL that is used to show Quarter date range from 1 to 4. Understand with Example The Tutorial illustrate
Sql query Duplicate
Sql query Duplicate  I have a Employee table with duplicate ID values... 3 D Delhi Then we have used the following query to find the duplicate data...'); You can use following query to find the duplicate id: select id, count(id
SQL Between Date
SQL Between Date       The Tutorial help you to understand SQL Between Date. In this Tutorial..._Table (Stu_Id varchar(2), Stu_Name varchar(15), Stu_Dob date); Insert Data
JDBC- SQL spatio-temporal query
JDBC- SQL spatio-temporal query  Any one give me a JDBC sql query for my spatio temporal query? Trajectory table OBJID PLACE 7 H 8 Q 9 W 10... as shown in above. I want a spatio-temporal query using JDBC-SQL to retrieve
JDBC- SQL spatio-temporal query
JDBC- SQL spatio-temporal query  Any one give me a JDBC sql query for my spatio temporal query? Trajectory table OBJID PLACE 7 H 8 Q 9 W 10... as shown in above. I want a spatio-temporal query using JDBC-SQL to retrieve
Sql Join Query
Sql Join Query  aTable Name : TblState Stid StateName CountryId --------------------------------------------- 01 TN 01 02 KR 01 03 KL 01 04 WB 01 05 New
to write an SQL query using insert statement
to write an SQL query using insert statement  I need to write an sql query for the below using InSERT command.pls help. Insert 5-star ratings by James Cameron for all movies in the database. Leave the review date as NULL
Hibernate Named Native SQL Query
In this section, you will learn Named Native SQL Query in Hibernate
Addintion in year fields of sql date in a java page
Addintion in year fields of sql date in a java page  In my database i have a field StartDate and EndDate Now entering date from my jsp..., HttpServletResponse response) throws ServletException, IOException { Date
SQL Date Between
SQL Date Between       Mysql Date Between return the date between the two existing date. Understand with Example The Tutorial illustrate an example from 'Date Between
ModuleNotFoundError: No module named 'sql_query_dict'
ModuleNotFoundError: No module named 'sql_query_dict'  Hi, My... named 'sql_query_dict' How to remove the ModuleNotFoundError: No module named 'sql_query_dict' error? Thanks   Hi, In your python
Mysql Date Today
; Mysql Date Today show you Query to retrieve the current today date.  Understand with Example The Tutorial illustrate an example from Date Today in My sql... date. date (now ( )) : The Query now ( )   return you the current today
How to get day from date in SQL?
How to get day from date in SQL?  Hi, How to get day from date in SQL? For your information I am working on the MySQL database. Thanks   Hi, You can use the following queries to get the data: select date_format(now

Ads