mkrausnick
Programmer
Pulling dates from SQL Server and displaying in a grid. SQL Server dates come down as data type 'T' with the time included. I want to display just the date, so I execute this code:
When I run it in the debugger I can see the value and datatype change, but the grid still displays the long format including the time.
How can I display just the date?
Mike Krausnick
Dublin, California
Code:
FOR nIndex=1 TO Thisform.Grid1.ColumnCount
IF VARTYPE(Thisform.Grid1.Columns[nIndex].Controls[2].Value) = "T"
Thisform.Grid1.Columns[nIndex].Controls[2].Value = TTOD(Thisform.Grid1.Columns[nIndex].Controls[2].Value)
ENDIF
NEXT nIndex
Thisform.Grid1.Refresh()
How can I display just the date?
Mike Krausnick
Dublin, California