SQL Server 2012 - Finding Missing Dates - date

I have a table of stock prices but some dates are missing.
How do I generate a list of missing dates for each stock ticker?

Related

I need to list dates between two dates with interval of one year

I am using Oracle 11g database and forms 6i and need to list all years with join date e.g(sysdate - join_date with interval of one whole year) between joining date and sysdate from employee table.
Please help me out...
I have two dates
DOB and sysdate.
for example the join date is '01-FEB-2010'
I need a list
'01-FEB-2010'
'01-FEB-2011'
'01-FEB-2012'
'01-FEB-2013'
'01-FEB-2014'
'01-FEB-2015'
'01-FEB-2016'
'01-FEB-2017'
'01-FEB-2018'
'01-FEB-2019'
'01-FEB-2020'
'01-FEB-2021'
'01-FEB-2022'
is it possible??

Power BI Week Visual Filtering

Power BI novice here. I have multiple reports which require date filtering by week. I can sometimes get the data to display with my Week column using dates from a column in the same table.
I thought building a Week column based on the date column would result in an easy to use visual. The week column is calculated by:
WeekYear = IF(
FORMAT(WEEKNUM(START.[Date],1)-1,"00"="00",
"Wk53-" & YEAR(START.[Date])-1,
"Wk" & FORMAT(WEEKNUM(START.[Date],1)-1,"00") & "-" & YEAR(START.[Date]))
This results in an x-axis displaying weeks in this format: Wk52-2019. If the underlying data of column STARTis in the proper datetime format, what could be the issue?
I noticed data on the visual which is not filtered for a date range display without issue. Trying to filter with DATESINPERIOD or other DAX date filters caused calculated measures to not display or break the model. I know a lot of references state having a separate calendar table is critical and I suppose I don't fully understand. Thanks in advance.
If you are trying to create the week in date format, then you can use the following calculation:
Week = Table[Start] - WEEKDAY(Table[Start],2)+1
This returns the Monday date of the week, if you want other days you can adjust the calculation accordingly.
If this is not what you are looking for, then you might have to clarify your requirements a bit more.

Crystal reports date functions and formula

I'm not even sure how to start writing this logic. I have help desk issues in a SQL database with a create date and a resolved date columns. I'm trying to display only the records in which their create date is 14 days or less than the resolved date. Right now the report prompts for the start date and end date. Now I want to modify it. How do I write this logic and in which section of the formula builder? I'm using CR 2011 Standard.

Getpivot data Excel 2016 Date not recognised

Hi I've got a Pivot table for various products in a company i work for. We have been moved to 2016 Excel and my New Pivot table is displaying the date after I formatted it in Access.
But, My Getpivot data does not recognise the date anymore. Any suggestions?
3 excel files also running in Excel 2016 are okay because they have not been changed but this new workbook now has stopped working.
Example here:
=IFERROR(GETPIVOTDATA("QUANTITY",'Qry from PST db'!$A$2,"Day/Night",$T$14,"SUPPLIER",S15,"ShiftDatet","17/11/2015"),"N/A")
The date of 17/11/2015 should point to a cell in the workbook but then the query now fails but is okay in other workbooks.
Same formula in different book that works:
=IFERROR(GETPIVOTDATA("QUANTITY",'Qry from PST db'!$A$2,"Day/Night",$T$14,"SUPPLIER",S15,"ShiftDatet",$E$13),"n/a")

db2 getting business dates between given dates

I have a table called "Publicholidays" where in dates are stored as Varchar.
My query should fetch all values from say table xxxx between the user selected dates that exclude the weekends(sat,sun), public holidays. I am new to DB2 so can anyone suggest me ideas please
Note: in DB dates are stored as String.
Mistake #1 - Storing dates as strings. Let's hope you have at least stored them YYYY-MM-DD and not MM-DD-YYYY.
Mistake #2 - Instead of a "Publicholidays" table, you need a Calendar (aka Dates or date conversion) table. It should have a record for every day along with a few flag columns BUSINESS_DAY, WEEKEND, PUBLIC_HOLIDAY. Alternatively, you could have a single DAY_TYPE column with values for business day, weekend and holiday. You'll also want to have a STRING_DATE column to make conversion between your string date and a true date easier.
Google SQL Calender table and you'll find lots of examples and discussions.
Lastly, strongly consider fixing your DB to store dates in a date column.