Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2005

Tip: Looking for answers? Try searching our database.

Calculations with DateTime fields using DataColumn.Expression stri

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt - 07 Dec 2004 04:17 GMT
I am trying to add Expression columns to a DataGrid that perform calculations
using other DateTime fields in the Grid.  It appears from the MSDN library
docs that DataColumn.Expression syntax allows you to compare date fields
using < > and convert them to strings, but nothing else that I can find.  Is
there a way to use custom built functions in Expressions, convert DateTime
values to numeric values within the Expression string, or an alternative to
using Expression?

The simple problem I'm experimenting with is to create an HoursWorked column
based on 2 "Short Time" DateTime columns : ShiftEndTime - ShiftStartTime.  I
would ultimately like a way to perform all functionality normally available
to DateTime objects.

Any help much appreciated.

Matt

I am using VB.NET 2003 Std with an OledbConnection to an Access .mdb file
Don Mackenzie - 31 Dec 2004 18:03 GMT
Matt,

Have you figured this out or gotten a response? I need to do the same thing
-- I want to subtract two dates and get the number of days between them. It
seems like an obvious thing to do but I can't find a reasonable way to do it.

Don

> I am trying to add Expression columns to a DataGrid that perform calculations
> using other DateTime fields in the Grid.  It appears from the MSDN library
[quoted text clipped - 14 lines]
>
> I am using VB.NET 2003 Std with an OledbConnection to an Access .mdb file
Morgan Vermef - 02 Jan 2005 06:19 GMT
Matt & Don

I think you looking for something in like this

http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q904q

> Matt,
>
[quoted text clipped - 33 lines]
>>
>> I am using VB.NET 2003 Std with an OledbConnection to an Access .mdb file

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.