Link to home
Create AccountLog in
Avatar of Hagita
HagitaFlag for Israel

asked on

Format Unbound DataGridView

Hi Experts,
I have an unbound datagrid view, I need to format data from 0.07620000000000000 to 6 digits after decimal. Can that be done by code? my SQL is :
"SELECT TOLP, TOLM,0 AS SEQ, KKD*25.4/1000 AS REQ ,TOLP*25.4/1000 AS PTOL, "_            & "  ,KNO, 0 AS MEASURED FROM BPCSELTF.KDHE"
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Try the Round function in SQL

http://www.w3schools.com/sql/sql_func_round.asp
Avatar of Hagita

ASKER

Hi Thanks but it does not omit the zeros. I would try the Format function -Do you know how I can specify the format string?
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.