on 10-14-2008 7:14 AM
Hi All,
I have set a Current Date in a Matrix Column but its not displaying the current date. The code i used follows :-
oCriticalDB.SetValue("U_insdate", oCriticalDB.Offset, Date.Today)
Please tell what should i change in it.
Thanks in Advance.
Regards,
Madhavi.
Hi,
it's again the old problem with the SDK-Var-Types.
Try with formatting your Date.Today to a String in "20081014"-Format: At the last parameter SetValue expects a String!
oCriticalDB.SetValue("U_insdate", oCriticalDB.Offset, "20081014")
For me the following rule has worked perfect in most (I would say nearly all) cases:
Have a look at the automatic help of .NET while typing a SDK-function:
If SDKs Get/Set-Value, ValueEx, Value etc... expect/return a string then format your value in - I call it - SDK-DB-format:
Price, quantity etc. => "1234.23" (this works for every language setting of B1 - also for germany where the dot normally is a comma
Date => "20081014"
If SDK expects/returns an object, then there's a good chance that you can use the .NET-Var-Type that you expect as a programmer:
Price, quantity etc. => Double
Date => DateTime )
I forgot: This only works when the field is DataBinded to a DataSource of the corresponding format!!
Is your U_insdate really a Date in DB?
Edited by: Roland Toschek on Oct 14, 2008 10:18 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roland,
I tried in the way u said and checked the Data Type too it is in Date only i bind it with Datasource but its not displaying the current date in the matrix. What should i do for that?. The code i tried:-
oCriticalDB.SetValue("U_insdate", oCriticalDB.Offset, Format(Date.Today, "yyyymmdd"))
Madhavi.
hi,
madhavi
oedit=oMatrix.Columns.item("x").cells.item(y).specific
oedit.String = Date.Today.ToString("dd/mm/yyyy")
give loop this code under matrix visible row loop
regards
varma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.