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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 date format issue

Author  Topic 

desikankannan
Posting Yak Master

152 Posts

Posted - 2008-08-12 : 07:17:32
hi,
iam working in vb.net application i have datetime field, i want to store the date like 12/08/2008 but in sql 2005 it storing 08/12/2008, looking forward your suggestions
i want to display dd/mm/yyyy format


select a.invctrlno as invctrlno, a.invno as InvoiceNumber, convert(varchar,a.invdt,103) as invdt,b.cname as cname from tblinvhd a,tblCstMst b where a.CCtrlNo =b.CCtrlNo order by invctrlno,invoicenumber

i want to display dd/mm/yyyy format iam using vb.net

Desikankannan

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-12 : 07:23:37
1 Dont worry how dates are stored in a table
2 Always use proper DATETIME datatype to store dates
3 Do formation at front end application, whenever you want to show there
4 Use tostring("dd/MM/yyyy") in VB.net

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -