DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 14 Aug 2007 13:16:03 -0700,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    benji
          2    Miha Markic miha at rthand com
                 3    benji
                 4    Miha Markic miha at rthand com
                        5    benji
                 6    Miha Markic miha at rthand com


Format date in datacolumn?   
I've got a datatable with 3 columns:
-A string
-A datetime
-An expression-based column

I want the expression based column to be a representation of both of the 
other columns. The expression looks like:

ColString + ' ' + ColDate

The only problem is that the datetime format is very verbose. I don't need 
the time at all, and I'd rather only have the month and year. Is there any 
way to adjust this formatting in this scenario?

Thanks...

-Ben
Date:Tue, 14 Aug 2007 13:16:03 -0700   Author:  

Re: Format date in datacolumn?   
Hi benji,

You might consider playing with SUBSTRING function or do the filling 
manually instead of using expressions.

-- 
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"benji"  wrote in message 
news:416DC926-0084-424C-88D4-70FA8F8D21BB@microsoft.com...

> I've got a datatable with 3 columns:
> -A string
> -A datetime
> -An expression-based column
>
> I want the expression based column to be a representation of both of the
> other columns. The expression looks like:
>
> ColString + ' ' + ColDate
>
> The only problem is that the datetime format is very verbose. I don't need
> the time at all, and I'd rather only have the month and year. Is there any
> way to adjust this formatting in this scenario?
>
> Thanks...
>
> -Ben 
Date:Wed, 15 Aug 2007 13:38:30 +0200   Author:  

Re: Format date in datacolumn?   
Hi Miha,

Thanks for the response. Could you elaborate a bit about doing the filling 
manually?

Thanks...

-Ben

"Miha Markic" wrote:


> Hi benji,
> 
> You might consider playing with SUBSTRING function or do the filling 
> manually instead of using expressions.
> 
> -- 
> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
> 
> "benji"  wrote in message 
> news:416DC926-0084-424C-88D4-70FA8F8D21BB@microsoft.com...
> > I've got a datatable with 3 columns:
> > -A string
> > -A datetime
> > -An expression-based column
> >
> > I want the expression based column to be a representation of both of the
> > other columns. The expression looks like:
> >
> > ColString + ' ' + ColDate
> >
> > The only problem is that the datetime format is very verbose. I don't need
> > the time at all, and I'd rather only have the month and year. Is there any
> > way to adjust this formatting in this scenario?
> >
> > Thanks...
> >
> > -Ben 
> 
> 
Date:Wed, 15 Aug 2007 06:50:05 -0700   Author:  

Re: Format date in datacolumn?   
"benji"  wrote in message 
news:235E75CE-7667-48BE-9871-4143F408FEE0@microsoft.com...

> Hi Miha,
>
> Thanks for the response. Could you elaborate a bit about doing the filling
> manually?


Use a normal instead of expression column. And then just fill it in a loop 
and when a relevant column value changes (DataTable.ColumnChanged event).

-- 
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Date:Thu, 16 Aug 2007 08:17:56 +0200   Author:  

Re: Format date in datacolumn?   
Hi Miha,

Do you have a suggestion of where to place the loop code? Is there an event 
that you'd suggest I handle for this? (Same question for when data changes)

Thanks...

-Ben

"Miha Markic" wrote:


> 
> "benji"  wrote in message 
> news:235E75CE-7667-48BE-9871-4143F408FEE0@microsoft.com...
> > Hi Miha,
> >
> > Thanks for the response. Could you elaborate a bit about doing the filling
> > manually?
> 
> Use a normal instead of expression column. And then just fill it in a loop 
> and when a relevant column value changes (DataTable.ColumnChanged event).
> 
> -- 
> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/ 
> 
> 
Date:Fri, 17 Aug 2007 14:53:15 -0700   Author:  

Re: Format date in datacolumn?   
I would fill the data after dataset is filled and then I would hook up 
ColumnChanged event to update my data.

-- 
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"benji"  wrote in message 
news:317AAAC0-D495-4627-95CC-B1D2FA280857@microsoft.com...

> Hi Miha,
>
> Do you have a suggestion of where to place the loop code? Is there an 
> event
> that you'd suggest I handle for this? (Same question for when data 
> changes)
>
> Thanks...
>
> -Ben
>
> "Miha Markic" wrote:
>
>>
>> "benji"  wrote in message
>> news:235E75CE-7667-48BE-9871-4143F408FEE0@microsoft.com...
>> > Hi Miha,
>> >
>> > Thanks for the response. Could you elaborate a bit about doing the 
>> > filling
>> > manually?
>>
>> Use a normal instead of expression column. And then just fill it in a 
>> loop
>> and when a relevant column value changes (DataTable.ColumnChanged event).
>>
>> -- 
>> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>>
>> 
Date:Mon, 20 Aug 2007 10:43:30 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us