Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

a.InsertedDate>= dateadd(hh,-1,getdate())

In salesforce marketing cloud, I have an InsertedDate field that is a date format field. The values look like this: Nov 16 2024 10:45AM. I am in eastern time zone. I am trying to only select records ...
Beginner Learning's user avatar
0 votes
1 answer
25 views

I am trying to return data from current tear and previous year. I keep getting a divide by 0 Error

If I go for data from just current year it works, if I go for data from just previous year it works, when I go with both current and previous I get the divide by 0 error? Select FISCYR, LTrim(RTrim(...
D.Thomson's user avatar
0 votes
1 answer
66 views

How to modify query run based on the day of the week?

I have code that runs every weekday looking for the previous day, however, on Mondays, it needs to look from last Friday through Sunday. Right now, I am manually commenting in and out rows of code if ...
Nora Delgado's user avatar
0 votes
0 answers
47 views

What is the maximum x for getdate()-x in SQL SSMS? [duplicate]

This question is more out of curiosity rather than troubleshooting. What is the furthest we can go back using getdate()-x in SQL (even if it is unrealistic e.g. 10000 years). I'm looking for its bound ...
Prez7112's user avatar
0 votes
0 answers
578 views

GETDATE() function in SQL Server does not work properly

For some reason the following code in my database server always returns the same value: SELECT GETDATE(); Date and time are always the same no matter how many times I execute this code and the date ...
KRISTIJAN TOMASINI's user avatar
1 vote
1 answer
174 views

powershell get-date to log file

I'm trying to get a script to test connectivity of a list of IP addresses and log the output to a file. I would like it to put a time/date stamp in the log when when I get no response. I'd like to ...
txjastx's user avatar
  • 11
-1 votes
2 answers
63 views

SQL Using Case with date function

I'm trying to use case for date to run query in SSIS backward 1 month which is if this month is January must show data of December last year and if months are in February to December must show data ...
Krittapat Somsiri's user avatar
0 votes
1 answer
116 views

NODEJS SEQUELIZE with POSTGRES - fails to create table - getdate() function doesn't exist

I have a node.js application using sequelize as an ORM, which should create tables if they don't exist on a local postgres development database. The queries created by sequelize all fail where there ...
rnorto's user avatar
  • 1
0 votes
0 answers
43 views

Convert GetDateTime to Time only format [duplicate]

I'm creating an events crud app and am trying to connect the "time" of the event from my database to my code. The data type in the database format is Time(7) and the asp.net code is ...
NateUser's user avatar
0 votes
0 answers
30 views

PS - Check a log file for particular text within a certain timeframe

I'm trying to get this to work within a PowerShell script, but it comes back with not defined. $file = Get-Content "C:\log\clock.log" $checktime = $(Get-Date).AddHours(-1) $containsWord = $...
SuperZee's user avatar
0 votes
1 answer
230 views

Comparing original file and last two files using PowerShell

I have another script that outputs data into a csv file every 4 hours and creates the files as vdsinfo_$(Get-Date -Format "yyMMdd_hh-mm-ss").csv. I want to be able to compare the original ...
SuperZee's user avatar
0 votes
1 answer
168 views

SQL Statement working in client but not within SSIS / Visual Studio

my script containes this part which runs fine if its commented out. where dbname.[Date] > DATEADD(month,-1, Getdate()) when i write this it will work in sql client but ssis ole db source will show ...
aef's user avatar
  • 1
0 votes
2 answers
638 views

Look for files with today's date and look for pattern in file, print what found

I'm trying to find the powershell equivalent of this Windows shell command, except now I'm looking for files with today's date: findstr /S /C:"Firmware version text" C:\Temp\Filename1* & ...
Michele's user avatar
  • 3,891
1 vote
0 answers
91 views

Is getdate() enough to figure database order of operations?

Suppose we have tables A,B,C,D, and each of them has a column [date1] which we positively know is filled during insert with the getdate() function. Is it safe to assume that if row R1 on some table ...
George Menoutis's user avatar
0 votes
1 answer
347 views

Select and Convert Date Of Birth from a table to check if their birthdays are today

I have a table called Genericattribute. It's as shown here. I need to make a Trigger or a query that checks if today is the birthday of any of these employees. I wrote a query that returns the Ids of ...
CK Vignesh's user avatar

15 30 50 per page
1
2 3 4 5
28