As part of my work,I need to read price values from Excel sheet . I need to implement
- Prices: Non-numeric characters in Price not allowed
- price should be valid number for price like int,decimal,double etc like 10,10.00,10,233 valid, -10,-10.00,-10,2333.00 etc are invalid
- Prices: Price format (dots, comma's, decimals)
- Zero and negative price values are not allowed
- Need to check price value type (number type like int,float,decimal etc but will save in database in money format)
What datatype I should we choose for Price ? decimal or double or anyother ? In database I took database field type as money.
See Question&Answers more detail:os