getdate Questions
6
Solved
I would love to insert a default value into a column with data type datetime2(7). However, because my website is hosted on a server in a different timezone, the getdate function doesn't work proper...
Salliesallow asked 20/11, 2013 at 2:29
11
Solved
I am having a small problem with my SQL query. I'm using the GETDATE function, however, let's say I execute the script at 5PM, it will pull up records between 12/12/2011 5PM to 12/18/2011 5PM. How ...
Hepner asked 18/12, 2011 at 22:24
6
Solved
I'm new to SSIS and I'm trying to convert a GetDate() to string "DD-MM-YYYY". This is the expression I've built so far:
(DT_WSTR, 8) DAY( GETDATE()) + "-" + (DT_WSTR, 8) (MONTH(GETDATE()) - 1) + "...
Eleven asked 23/5, 2013 at 10:19
5
Solved
Is it possible to deceive SQL Server to return a different date on GetDate() without actually changing the machine date?
This would be great, since we have a database with old data and I'm trying t...
Parton asked 7/4, 2010 at 14:1
3
Solved
Maybe I am having a moment of 'afternoon', but can anyone explain why I get
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ')'.
When running
CREATE PROC DisplayDate
(@DateVar DA...
Rebuttal asked 8/3, 2010 at 3:21
11
I would like to convert getdate() in SQL Server to EST time.
Bassett asked 17/1, 2011 at 11:26
7
Solved
In SQL Server how do I format getdate() output into YYYYMMDDHHmmSS where HH is 24 hour format?
I've got the YYYYMMDD done with
select CONVERT(varchar,GETDATE(),112)
but that is as far as I got...
Dewaynedewberry asked 23/9, 2011 at 4:8
3
Solved
Is there anyway to get a java.time (new in Java 8) compatible time class out of a ResultSet?
I am aware you can use ResultSet's getDate or getTimestamp but these method return java.sql.Date / jav...
12
Solved
The following script returns 20 instead of 21!
var d = new Date("2010/03/21");
document.write(d.getDate());
What am I doing wrong? Is this a JavaScript bug?
Petitionary asked 21/3, 2010 at 19:3
4
Solved
I would like to get the DATETIME column from an Oracle DB Table with JDBC. Here is my code:
int columnType = rsmd.getColumnType(i);
if(columnType == Types.DATE)
{
Date aDate = rs.getDate(i);
valu...
2
Solved
I created a WordPress custom post type to be able to create events, select the event's date, and display the date on the frontend.
I added a new meta_key in the postmeta of WP's database to store...
Considering asked 26/5, 2011 at 22:47
4
Solved
I have an orders table which contains an order ID, order date and order description.
I want to run a select query which captures all orders that have been created in the last two days. so the curr...
Tinnitus asked 14/12, 2017 at 16:41
4
Solved
When we convert or cast date in sql, see below sql code
SELECT CONVERT(VARCHAR(10), GETDATE(), 110) AS [MM-DD-YYYY]
it works fine, I just want to know the meaning of 110 in above code. what it ...
7
I want to print GETDATE() in SQL Server 2008, I need the time with milliseconds (this is for debugging purpose - to find sp's execution time )
I find this Difference
SELECT GETDATE() returns 20...
Gass asked 15/3, 2011 at 13:12
5
Solved
I'm trying to create a report that gets records from a SQL Server database where the delivery date is today.
I've tried
select * from (tablename)
where delivery_date = getdate()
Although that d...
Sturtevant asked 15/3, 2016 at 18:5
2
Solved
Running two simple select statements:
SELECT GETDATE()
SELECT LEFT(GETDATE(), 10)
Returns:
2015-10-30 14:19:56.697
Oct 30 201
I was expecting LEFT() to give me 2015-10-30, but instead it...
Meredith asked 30/10, 2015 at 14:24
5
Solved
Is it possible to change the datetime for a particular database on SQL Server?
Is it tied to the operating system's date/time?
We wish to simulate a future datetime for testing purposes i.e. so t...
Valeryvalerye asked 23/11, 2011 at 17:30
2
Solved
I've a script scheduled every 4th and 14th day of month.
when script starts on 4th, I need to get the last day of the previous month (easy, $a.AddDays(-5))
when script starts on 14th, I need to g...
Illnatured asked 30/4, 2013 at 20:2
2
Solved
I used this part of a query to create a table column for the date and time a row is added:
order_date datetime NOT NULL DEFAULT GETDATE()
and whenever a new row is created, the data for order_dat...
Ramses asked 8/4, 2014 at 17:23
3
Solved
I'm using these lines in a script to write some information that I'll finally put in a log file.
$log = "some text: "
$log += Get-Date
$log += "; some text"
This way I'll get my data correctly, ...
Spoilfive asked 13/2, 2013 at 8:35
3
Solved
how can I get the date in this format [mm/dd/yy] using javascript. I am struggling to get the 'year' to a 2 digit figure as opposed to the full 4 digits. Thanks!
Cystic asked 1/11, 2012 at 19:22
1
Solved
I need to check the SQL date range between some values.
Example. To check records added between last 2 to 1 hours.
Is the below query correct:
SELECT *
FROM tablename
WHERE dtdatetime BETWE...
Sulfonation asked 10/10, 2013 at 13:42
2
Solved
2
Solved
When I run the following query:
select convert(int, getdate())
I get the result:
-----------
41238
(1 row(s) affected)
Does anyone knows what does this mean?
5
Solved
suppose
isnull(some_column, getdate()) >= getdate()
where logic is if some_column is null this expression should always be true. However will this always be so (since between two evaluations ...
Shapeless asked 20/8, 2012 at 8:53
1 Next >
© 2022 - 2024 — McMap. All rights reserved.