Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 changing date format and adding currency values
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 06/18/2013 :  10:40:40  Show Profile  Reply with Quote
This is my table.
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-DD
only.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?

Flowing Fount of Yak Knowledge

1054 Posts

Posted - 06/18/2013 :  10:57:24  Show Profile  Reply with Quote
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 server

Go to Top of Page

Starting Member

2 Posts

Posted - 06/18/2013 :  11:53:28  Show Profile  Reply with Quote
I get the output to the browser using php+mysql.How to convert the date format?
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 06/18/2013 :  12:04:05  Show Profile  Reply with Quote
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:
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000