Re: date problem
- From: "David Londeck" <dlondeck@xxxxxxxxxx>
- Date: Mon, 13 Mar 2006 11:27:46 -0500
If you are Using SQL Server 2000 try the following.
SELECT CONVERT(VARCHAR, GETDATE(), 101) AS DateResult
SELECT CONVERT(VARCHAR, GETDATE(), 108) AS TimeResult
"yoshitha" <gudivada_kmm@xxxxxxxxxxx> wrote in message
news:%23%23JCDeyKGHA.1312@xxxxxxxxxxxxxxxxxxxxxxx
hi
db : sql server 2000
lan : C#.net(ASp.Net)
in my database table there are 2 fileds of data type datatime.
in field 1 i'm storing date
in field 2 i'm storing time.
in my textbox date is in the format of 2/12/2006 and i'm inserting as it
is.
and time is in teh fromat of 10:30 and i'm inserting as it is.
but after retrieving and displaying in data grid it is diplsying the
filed 1 like this.
2/12/2006 12:00:00 AM
and field is displaying like this.
1/1/1900 12:00:00 PM
but i need data to be displayed in field 1 as 2/12/2006
and in field 2 as 10:30.
can anybody tell me how to do this. its very urgent for me.
thanx in advacne
yoshitha
.
- Prev by Date: Re: Custom Datagrid
- Next by Date: Re: Custom Paging in asp.net Datgrid Using Sql
- Previous by thread: DataGrid And Positioning
- Next by thread: button in footer doesnt work?
- Index(es):
Loading