Questions tagged [smalldatetime]
59 questions
0
votes
4 answers
how to disable displaying time in datatype smalldatetime
I have a textbox that should inserting a date in dd/MM/yyyy format. What only I can find and use is smalldatetime or datetime. I pick smalldatetime and the data displayed was like for example 01/07/2011 12:00:00 AM. Any codes involved to sort this…

Com.Man.Do.Girl
- 177
- 2
- 4
- 16
0
votes
1 answer
Trigger date conversion fails
I have a trigger doing an INSERT_AFTER to a different table. The destination table is a staging table for data to be sent to another company. In the database on our side, the date is a smalldatetime. The other comp;any needs this split to a Date…

Jim Snyder
- 99
- 2
- 9
0
votes
1 answer
Return extra ".0" when reading "smalldatetime" column with PreparedStatement
I have a table in SQL Server with a column type smalldatetime and I am using PreparedStatement to read/write data in my tables. E.g My table is like:
| date |
+------------------------+
| 2019-11-06 09:48:00 +
| 2019-11-05…

yaylitzis
- 5,354
- 17
- 62
- 107
0
votes
1 answer
SQL Server 2008 : issues with date conversion
I'm currently updating our database system in which the date field is in nvarchar (20), however I have changed this into smalldatetime. In doing so though, certain dates are changing from 11/12/2014-------> 12/11/2014
Old Date …

UCDA2919
- 1
- 3
0
votes
1 answer
Convert datetime to smalldatetime in SQL stored procedure that preserves the time?
I have a stored procedure that gets data from a database that utilizes a column with type datetime (there is a valid time value in it) and it updates a table in another database that happens to use the smalldatetime type. When trying to convert…

CurlyShuffle
- 135
- 13
0
votes
1 answer
How to insert smalldatetime
I'm new to sql server since this is the requirement of my client. I can't insert because of the error I'm getting regarding the smalldatatime. What's wrong with my query? I have tried everything but still it gives me error.
Here are the things I…

irish
- 39
- 2
- 8
0
votes
3 answers
Tsql VarChar implicitly to SmallDateTime
When executing the following using a smalldatetime constraint on the returned results, I get zero results:
Execute sp_proc @DateOfBirth = '01/01/1900'
or
Execute sp_proc @DateOfBirth = '1900-01-01'
But when using the following varchar…

mirezus
- 13,892
- 11
- 37
- 42
0
votes
1 answer
Convert timestamp (int) to smalldatetime (t-sql)
I have a MySQL-Database with several rows. In that environment, I stored the current time as a Timestamp (int).
Now I need to migrate my data from a MySQL to a T-SQL-Database. I'm running SQL-Server 2008.
I checked several approaches, but couldn't…

DasSaffe
- 2,080
- 1
- 28
- 67
0
votes
1 answer
Modifying an XML - SMALLDATETIME
Hi I am working with XML in SQL server and trying to use the modify function on a SMALLDATETIME variable but it does not give me desired result.
DECLARE @Shift_StartDate SMALLDATETIME = '2017-06-05 09:00:00';
DECLARE @Shift_EndDate SMALLDATETIME…

BRDroid
- 3,920
- 8
- 65
- 143
0
votes
1 answer
OleDBDataType for smalldatetime
I have an sp with a parameter of smalldatetime datatype. I'm calling my SP through OleDbConnection in my C# code. using OleDbConnection is a requirement so don't answer to change my connection type to SqlConection.
Now my problem is I cannot pass…

rob waminal
- 18,117
- 17
- 50
- 64
0
votes
2 answers
Any good reason not using SMALLDATETIME when I don't need to store seconds?
Using SQL Server 2014:
I am working with a few large log tables and one of their columns is CreateDate of datatype DateTime.
There are a few indexes based on the CreateDate columns. All tables already include large number to rows.
Question #1: is…

Allan Xu
- 7,998
- 11
- 51
- 122
0
votes
1 answer
Arithmetic overflow error for smalldatetime
COUNT(DISTINCT CASE WHEN DATEDIFF(d, ClientVisit.rev_timeout, ClientVisit.signature_datetime) = 3 THEN
CASE WHEN ClientVisit.multiple_flag = 1
THEN ClientVisit.rev_timein
ELSE ClientVisit.clientvisit_id END
…

AS91
- 527
- 7
- 18
0
votes
1 answer
smalldatetime comparison SQL Server
I have a smalldatetime field in my SQL database. The SQL format for this is type is : yyyy-mm-dd hh:mm:ss
I need to query my database and request all records where the date matches today's date AND the time portion is 100 minutes from the present…

user6167266
- 41
- 11
0
votes
1 answer
SQL Server import - smalldatetime error
I am trying to import data into an existing SQL Server table from a CSV file via the built in import/export wizard, however no matter how I format the date/time in the CSV, the wizard throws up an error:
Error 0xc020901c: Data Flow Task 1: There…

tomstephens89
- 123
- 2
- 9
0
votes
1 answer
How do I stop SQL Server converting 1900-01-01 to NULL
There seems to be lots of posts on how to convert 1900-01-01 to NULL, but my problem is the opposite. I have stored procedures processing smalldatetime (SQL Server 2008), but they keep converting 1900-01-01 to NULL, when I really want it to remain…

KirstieBallance
- 1,238
- 12
- 26