Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
clarkson
Starting Member
2 Posts |
Posted - 2013-06-18 : 10:40:40
|
This is my table.CREATE TABLE Sales(store_name VARCHAR(50),Sales DECIMAL(10,2),Date DATE);But I can insert into the table Date fields in the format of YYYY-MM-DDonly.But I want to get the output to the browser in the form of for example Jan-05-1999.And also how to get the sales value without decimal parts? |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2013-06-18 : 10:57:24
|
you can handle formatting in the application as you want. Is there any specific need to get this done through the SQL server? I would suggest to handle such formatting things on the application end (for sake of better performance) instead of doing it in SQL serverCheersMIK |
|
|
clarkson
Starting Member
2 Posts |
Posted - 2013-06-18 : 11:53:28
|
I get the output to the browser using php+mysql.How to convert the date format? |
|
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-06-18 : 12:04:05
|
I don't know how to format the dates in MySQL. This forum is for Microsoft SQL Server, so I would be surprised if there are many here who know MySQL. But, just a quick googling brought me to this page, which has the various format strings and examples: http://www.w3schools.com/sql/func_date_format.asp |
|
|
|
|
|