Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Date column in matrix ....

Hi my gurus,

I design form by Screen Painter with a matrix, I want to load DocNum, DocDate, ... of ORDR table into matrix, but it error: "Invalid date value". Pls tell me how to do it. Thanks for everything.

replied

Hi Andy

In the first code snippet where u loop through a recorset object & fill in ur values

oEdit = colPostDate.Cells.Item oMatrix.RowCount).Specific

oEdit.Value = oRS.Fields.Item("DocDate").Value

Try using a datetime object where u store the the returned DocDate & then assign the value of this object to the matrix

eg

Dim tmpDate as Datetime

tmpdate = oRS.Fields.Item("DocDate").Value

oEdit = colPostDate.Cells.Item oMatrix.RowCount).Specific

oEdit.Value = = tmpDate.toString("yyyyMMdd")

The error that u get is mainly because the return type of recordset is "Date" whereas oEdit.Value is string

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question