convert datetime data type column to "dd-MMM-yyyy"

PRAISE PHS

Well-known member
Joined
Jun 2, 2011
Messages
58
Programming Experience
Beginner
Hi All,

Pls how do I change the column of date to "dd-MMM-yyyy" on sql server 2008 r2. I have changed that of my PC to "dd-MMM-yyyy". But I noticed it did not reflect on sql server 2008. Pls help me out.
 
SQL Server uses the database collation to determine things like number and date formats, sort orders, etc... Why does it matter to you in which format the datetime is stored anyways, it only matters which format you display on your forms and reports. You can use .ToString plus a standard or custom format string to output the DateTime how you want it.

In particular, keep in mind the format you chose is not sortable. The standard ISO format is yyyy-MM-dd.
 
SQL Server uses the database collation to determine things like number and date formats, sort orders, etc... Why does it matter to you in which format the datetime is stored anyways, it only matters which format you display on your forms and reports. You can use .ToString plus a standard or custom format string to output the DateTime how you want it.

In particular, keep in mind the format you chose is not sortable. The standard ISO format is yyyy-MM-dd.

Thanks Herman for the reply.
 
What you see in Management Studio is not how the data is stored anyway. It's just how the data is displayed. If you want to change how it's displayed in Management Studio then that's a Management Studio configuration issue and nothing to do with VB.NET. Once you retrieve any date data from any database into a VB app then you have DateTime values anyway so how that data was represented in the database is completely irrelevant.
 
What you see in Management Studio is not how the data is stored anyway. It's just how the data is displayed. If you want to change how it's displayed in Management Studio then that's a Management Studio configuration issue and nothing to do with VB.NET. Once you retrieve any date data from any database into a VB app then you have DateTime values anyway so how that data was represented in the database is completely irrelevant.


Thanks Jim for your response. I was able to finally figure out what I wanted.
 
Back
Top