Hi I have used the following statement to set the date format of a column in the grid. grid1.DisplayLayout.Bands(0).Columns("Col1").Format = "MM/dd/yyyy hh:mm:ss" But I am hardcoding the format here. And if this applicationis run somewhere in UK they would expect dd/MM/yyyy format. So, is there a way I can specify the Format of column to make use of current date format of system. I tried assigning it System's DateTime Format. But they are different in cases which is increasing my code a lot. So what could be my next option to specify Date,Time (12hrs format) of current system?
Thanks,
Sindhu
Check out the Microsoft documentation on the ToString method of a DateTime variable. This is all Format does, it call ToString on the value and passes in the format. I'm pretty sure there are formats you can use for things like Short Date or Long Date that will use the current culture settings on the machine.
Hey,
Thanks. Its working fine with {date} {time}. Setting that value to MaskInput is picking date format from the current system's date format.
Thank you,