FAQ Database Discussion Community


Range Selector in Are Graph of High Chart

jquery,highcharts,date-range
I am using the Highchart to draw charts of my data.I have seen the date range selector in this chart but I am using Area Graph but range selector is not coming in this.Following is my code. jQuery('#weenat_statr_chart').highcharts({ title: { text: chart_title }, xAxis: { type: 'datetime' }, yAxis: {...

Get max bookings count in range

sql,ruby-on-rails,activerecord,date-range
I have a ParkingLot model. Parking Lots have a number of available lots. Users can then book a parking lot for one or more days. Hence I have a Booking model. class ParkingLot has_many :bookings end class Booking belongs_to :parking_lot end Simplified Usecase ParkingLot Given a parking lot with 5...

Range Attribute for Dates

c#,data-annotations,date-range,asp.net-mvc-5.2,displayattribute
I have this class overriding the RangeAttribute: public class RangeDateAttribute : RangeAttribute { public RangeDateAttribute() : base(typeof(DateTime), DateTime.Now.AddYears(-20).ToShortDateString(), DateTime.Today.ToShortDateString()) { } } DataAnnotation for my attribute: [RangeDate(ErrorMessage = "Value for {0} must be between {1} and {2}")] public DateTime anyDate { get; set; } I'm using the method [ToShortDateString()] in...

How do I compare a date range to values in a table?

ms-access-2010,date-range
I have a form where the user will plan material transfers based on how many days he wishes to plan ahead for. Today is Monday. Let's say he selects that he wants to plan for 2 days ahead - up until Tuesday and Wednesday. Therefore, he would enter "3" into...

Get today,this week,this month and this year data in single query in MySQL?

php,mysql,sql,date-range
I am retrieving today's data from db,I want to retrieve this month,this year data as well,Is it possible in single query? or should I go with separate query for each items? My query given below, select sum(it.rate * it.quantity)as sales from invoices i join invoice_items it on i.id = it.invoice_id...

R Shiny Date range input

r,shiny,date-range
I have a date range input function as follows in my ui for my shiny app. dateRangeInput("dates", "Date range", start = "2015-01-01", end = as.character(Sys.Date())) However I want a pop up message to correct the user if the user chooses a start date that is later than the end date,...

Getting values for a varying date range in Postgresql

sql,postgresql,max,date-range
I am trying to get a maximum value from one table using the date range from another table. I am using SQL on a postgresql database. The goal is to get the maximum value for the date range added to the table that has the start and end date (by...

How to create a new date range type with included upper bound in Postgres?

postgresql,date-range
Postgres comes with a nice feature called Range Types that provides useful range functionality (overlaps, contains, etc). I am looking to use the daterange type, however I think the type was implemented with an awkward choice: the upper bound of the daterange is excluded. That means that if I defined...

Jquery DataTable Date Filter

jquery,jquery-datatables,date-range
I have a jquery datatable and it has date filter.My Code looks like this as mentioned in the below plunker link mentioned.Pasting my JS code for DatePickers $(function() { var oTable=$('#datatable').DataTable({ "oLanguage": { "sSearch": "Filter Data" }, "iDisplayLength": -1, "sPaginationType": "full_numbers", }); $('#datepicker_from').click(function() { $("#datepicker_from").datepicker("show"); }); $('#datepicker_to').click(function() { $("#datepicker_to").datepicker("show"); });...

Date ranges to series of 1 or 0 in R

r,date,date-range
I have pharmacy claims data that list start and end fill dates by patient. For calculations down the road I would like to record a true (1) or false(0) diary of whether or not each patient has dates recorded for a given day. Using the sample data below I am...

Calculate price given standard rates and seasonal date ranges

php,mysql,sql,date-range,reservation
I'm building a reservation style system. The rooms have a yearly standard rate (this is where my question differs from other similar ones, because others have unique ranges) then they also have date ranges within the year which are set at different prices. I'm looking to calculate the price in...

How do I calculate the number of days using MonthCalendar in C#?

c#,winforms,date-range,monthcalendar
I have added the calendar form and it won't let me select 2 dates. It assigns every click to the start date so when I try this it always tells me the difference is 1 and the start date is always changed to whatever my next click is? Is it...

View as table with range od date for each record

sql,for-loop,sql-server-2005,view,date-range
I have table employees with columns surname, names, birth date etc. What I want to have is a table that for each row in employees table have range of dates, for example: surname0 , day()+0 surname0 , day()+1 surname0 , day()+2 ................. surname0 , day()+30 surname1 , day()+0 surname1 ,...

sql join and group by generated date range

sql,join,common-table-expression,date-range
I have Table1 and I need a query to populate Table2: Problem here is with Date column. I want to know the process of location/partner combination per day. Main issue here is that I can't pick DateCreated and make it as default date since it doesn't necessarily cover whole date...

Google Search Appliance querying date meta field with given range

date-range,google-search-appliance
I want to send a query to the Google Search Appliance that includes date range criteria of a meta field (lets call it metaDate). For example: metaDate field between 01.01.2010 and 01.01.2015. How can i construct a query such like this?

How to get 'available' couriers on a certain date in MySQL?

mysql,date-range
Background I have a table Deliveries: +---------+-------------+---------------+ | courier | pickup_date | delivery_date | +---------+-------------+---------------+ | Sebby | 2015-05-02 | 2015-05-04 | | Ian | 2015-05-07 | 2015-05-08 | | Sebby | 2015-05-12 | 2015-05-16 | | Bart | 2015-05-18 | 2015-05-21 | | Ian | 2015-05-27 | 2015-05-29 |...

Pandas: Working with missing data in data frame index by time

python,pandas,date-range
I got the following DataFrame(sample): date Value1 Value2 2007-05-25 11:50:00 1 15 2007-05-25 12:00:00 2 30 2007-05-25 12:10:00 3 25 2007-05-25 12:50:00 2 34 2007-05-25 13:00:00 9 35 2007-05-25 13:10:00 6 10 You can see that data from 2007-05-25 12:20:00 until 2007-05-25 12:40:00 is missing. What I would like to...