Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a String by adding 2 date fields together

Status
Not open for further replies.

AndyFreeman

IS-IT--Management
Mar 22, 2004
70
GB
I am still a novice with .NEt am trying to take 2 fields and display them as on string.


I have got this far, but am then receiving an error message
dim full_dt as string

full_dt=dtsOUPC.tables("cdt").rows & " " & dtsOUPC.tables("ctm").rows

The error is

Compiler Error Message: BC30452: Operator '&' is not defined for types 'System.Data.DataRowCollection' and 'String'.
 
The code you have shows you trying to join two row collections together, not two dates, try

full_dt=dtsOUPC.tables("cdt").rows(rowindex).item("mydatefield") & " " & dtsOUPC.tables("ctm").rows(rowindex).item("mydatefield2")

Hope that helps
 
thanks for that think i was having a blonde moment ( no offence to any blonde haired people)

The variable i have now created, how can i add it so it becomes part of the datatable that is visible in my Datagrid?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top