Strange Behaviour Follow
Hi All
I have a label template with many fields. One of the fields is of DateTime type and formatted as "MMMM yyyy". When i programmatically pass the values to this field i get strange behaviour as listed below
If i pass 11/3/2013 (11th March) the label prints November 2013 which is not correct
If i pass 12/3/2013 (12 th marhc) the label prints Decemeber 2013 which is again not correct
But when i pass 13/3/2013 (13th March) the label prints March 2013, it prints correctly
thus any date > 12 th March the label prints March 2013 which is correct
Another interesting observation is, if we run our app on the server where BT is installed, the dates are formatted and printed correctly.
If we invoke our program from a client pc, then the above behaviour is observed
The code that passes the values to the label template is as below
format.Substrings[strColumnName].value = String.format("{0:dd/MM/yyyy}", dsLabelData.Tables[0].Rows[0][colIndex].ToString());
Please sign in to leave a comment.