Calculations with DateTime fields using DataColumn.Expression stri

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top