My website working perfect on local, but not in host.
I wrote my queries with MSSQL 2008 on local , but our hosting company using 2005
Any solutions?
EDIT : Using DateTime
instead of Date
looking like solution thanks.
If anyone meets a problem like this i solved my problem with using this query instead of DATE type.
CONVERT(VARCHAR, GETDATE(),104) Output -> 15.03.2011
SQL Date Data TypesMySQL comes with the following data types for storing a date or a date/time value in the database: DATE - format YYYY-MM-DD. DATETIME - format: YYYY-MM-DD HH:MI:SS. TIMESTAMP - format: YYYY-MM-DD HH:MI:SS.
SYSDATETIME is a nondeterministic function. Views and expressions that reference this function in a column cannot be indexed. SQL Server obtains the date and time values by using the GetSystemTimeAsFileTime() Windows API.
The DateTime2 is an SQL Server data type, that stores both date & time together. The time is based on the 24 hours clock. The DateTime2 stores the fractional seconds Up to 7 decimal places (1⁄10000000 of a second). The Precision is optional and you can specify it while defining the DateTime2 column.
As Date columns aren't available in Sql Server 2005 so you have two choices:
1) Ask your hosting company to use Sql Server 2008 (or choose another host which does)
2) Use DateTime columns instead of Date
DATE is a new datatype introduced in 2008. It is not available in 2005.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With