I don't like store time in smalldatetime field owing to application limitation, Is there any solution, let me help matter is most urgent and my application is too big.
Thanking You
R.MallWhat is the application limitation?? do u need to run queries aganist this column??|||What is the application limitation?? do u need to run queries aganist this column??
In totality it is big application already developped in PowerBuilder 7.3 and fullfill the need of business. That was with sybase, rightnow I am looking to port this data into MSSQL Server and application also tested on the MSSQL Server 2000, It is working as per need apart from date issue. Sybase doesn't need to store time with date, So I am looking similar datatype which doesn't need to store timestamp in date columns.
Is the any way to resolve this issue at database level.
Thanks
R.Mall|||Hi,
SQL Server do not support Time data type as such...So to store a time only data u will have to store the integer portion of datetime datatype as 0 ...(i.e January 1, 1900)...
But then if ur application does not allow u to use datetime datatype...may be try with CHAR......|||How I can store only integer part in datetime colmns.
Thanks|||How I can store only integer part in datetime colmns.make sure when you save a datetime value that you do not provide a time value as well
so INSERT ... VALUES ... ( '2004-10-27' ... ) is okay, and the time portion of the value is set to 00:00:00
however, INSERT ... VALUES ... ( getdate() ... ) includes a time
if you want to strip the time, use
... cast(convert(char(10),getdate(),120) as datetime)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment