How do I format numbers in SQL? A few examples:
I need a number that will keep the leading zeroes. When the user enters “0099” the number goes into the table and stays as “0099”. Or “0111” staying as “0111”. .
Also:
“1.450000000000” formats to “1.45000”. Five decimals to the right.
“1.45000001” formats to “1.45001”. Once again, five decimals to the right but rounds up.
Also dates:
“01-01-2001 12:00:00 AM” to “01-01-2001”
Thanks.
I need a number that will keep the leading zeroes. When the user enters “0099” the number goes into the table and stays as “0099”. Or “0111” staying as “0111”. .
Also:
“1.450000000000” formats to “1.45000”. Five decimals to the right.
“1.45000001” formats to “1.45001”. Once again, five decimals to the right but rounds up.
Also dates:
“01-01-2001 12:00:00 AM” to “01-01-2001”
Thanks.