sqldatetime Questions

4

Solved

What I am trying to do is take a date in SQL Server and find the last possible hour, minute, second, and millisecond of that date. So if the date is this: 2021-02-16 13:08:58.620 I would like to re...
Selie asked 7/6, 2021 at 20:31

6

Solved

While converting .NET DateTime (when is default(DateTime)) to SqlDateTime should I always check if the .NET date is between SqlDateTime.MinValue and SqlDateTime.MaxValue [or] Is there a good way to...
Hovel asked 3/2, 2010 at 10:8

7

Solved

I have a column Month in my table. The month name and date are stored in this month column like Month 01-JAN-12 02-FEB-12 and so on. How do I convert the DATE into month number such as M...
Metopic asked 26/12, 2012 at 13:22

3

Solved

How do I convert a LocalDate to a java.sql.Date? Attempt: Record r = new Record(); LocalDate date = new Date(1967, 06, 22); r.setDateOfBirth(new Date(date)); This fails (won't compile) and all ...
Pressurize asked 20/3, 2015 at 14:8

2

Solved

I want to store a LocalDate in a DATE column and retrieve it unchanged. Both DATE and LocalDate are "local" types by definition. Therefore, the concept of timezone should not interfere in any way. ...
Outrigger asked 12/6, 2016 at 21:52

3

Solved

I have a table in SQL Server which contains the duration of a user working for different jobs. I need to calculate the total number of experience for user. Declare @temp table(Id int, FromDate DAT...
Cotoneaster asked 11/12, 2015 at 7:27

5

Solved

I am trying to insert java.util.Date after converting it to java.sql.Timestamp and I am using the following snippet: java.util.Date utilDate = new java.util.Date(); java.sql.Timestamp sq = new jav...
Vaginal asked 4/4, 2014 at 8:1

4

Solved

I receive data in a certain format. Dates are numeric(8,0). For example 20120101 = YYYYMMDD There exists rows with values like (0,1,2,3,6) in that date field, thus not a date. I want to check if ...
Therianthropic asked 3/5, 2013 at 7:2

1

Solved

Im trying to execute the following SQL query and filter out the data based on the date. I need to display a table which filters out the data such that, only those rows which are between the mentio...

1

Solved

I have big table with 22 millions records. I want to execute next query: select auto_alerts from alerts_stat where endDate > "2012-12-01" To improve performance I added BTREE index for endD...

3

Solved

Consider the following program: DateTime dateTime = new DateTime(634546165144647370); SqlDateTime sqlDateTime = new SqlDateTime(dateTime); Console.WriteLine("dateTime.TimeOfDay = " + dateTime.Tim...
Picot asked 19/10, 2011 at 16:34

1

Solved

I am trying to do a plot of a time series with DateListPlot. I want to feed it a time series I obtain from an SQL database. When I retrieve the time series the list is composed of SQLDateTime entri...
Yankee asked 18/3, 2010 at 15:52
1

© 2022 - 2024 — McMap. All rights reserved.