Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DateTime format

Reply
Thread Tools

DateTime format

 
 
PawelR
Guest
Posts: n/a
 
      04-21-2005
Hello group,
In my webapps I have datagrid binding with table from dataset. In table I
have columns with datetime format.
In dataGrid date is display in format "yyyy-mm-dd hh-mm-ss" but I want only
"yyyy-mm-dd".
This column is "Template Column"
How do it?


 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      04-21-2005
You can pass a format string when calling DataBinder.Eval:

http://msdn.microsoft.com/library/de...asp?frame=true

-Brock
DevelopMentor
http://staff.develop.com/ballen



> Hello group,
> In my webapps I have datagrid binding with table from dataset. In
> table I
> have columns with datetime format.
> In dataGrid date is display in format "yyyy-mm-dd hh-mm-ss" but I want
> only
> "yyyy-mm-dd".
> This column is "Template Column"
> How do it?




 
Reply With Quote
 
 
 
 
singh_angrez@rediffmail.com
Guest
Posts: n/a
 
      04-21-2005
Hi,

For formating date time to string , hope this will help you....
http://msdn.microsoft.com/library/de...ringTopic1.asp

Regards,
Angrez

 
Reply With Quote
 
I'm Home
Guest
Posts: n/a
 
      04-21-2005
Perhaps you can in the format column for the specific column in datagrid
property builder, use something like:
{0:yyyy-mm-dd} ... that not be exactly right but it's close I think.
HTH, Bob

"PawelR" <> wrote in message
news:...
> Hello group,
> In my webapps I have datagrid binding with table from dataset. In table I
> have columns with datetime format.
> In dataGrid date is display in format "yyyy-mm-dd hh-mm-ss" but I want

only
> "yyyy-mm-dd".
> This column is "Template Column"
> How do it?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [2.4.4] creating a datetime.datetime from an XML xs:dateTime skip@pobox.com Python 2 01-06-2009 01:31 PM
[2.4.4] creating a datetime.datetime from an XML xs:dateTime Martin Python 0 12-27-2008 08:08 PM
mx.DateTime to datetime.datetime mp Python 1 07-28-2006 10:57 PM
datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Christos TZOTZIOY Georgiou Python 3 09-13-2003 10:44 AM
RE: datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Tim Peters Python 0 09-09-2003 12:57 AM



Advertisments