The tag has no usage guidance.

learn more… | top users | synonyms

-6
votes
0answers
20 views

Components of Time Variant Data [on hold]

Specify components that would be required to hold time variant data for policy enforcement and training management
0
votes
0answers
13 views

MySQL Database delay [closed]

I've made my TV into a clock using PHP, a dedicated machine, and recently am adding MySQL to the equation to allow editing the settings from my phone. I've gotten this working, however, there is an ...
1
vote
0answers
12 views

Time series data and utc conversion

I'm storing data in minute, hour, day, month and year buckets. All data is stored in UTC. Let's assume a client is in PDT time (-07:00 UTC) If the client wants to query for the hour sum of 4/23/2016 ...
0
votes
1answer
23 views

MS Access Data Type for time in hh:mm:ss format

My database contains three different sporting events with finishing times imported from an Excel spreadsheet in the hh:mm:ss format. How do I customize the Access data type field to accept this ...
2
votes
1answer
52 views

Grouping data by year based on two timestamp columns

My data table has the following columns: id INTEGER, name TEXT, created TIMESTAMP, deleted TIMESTAMP I want to product a report of the count of each name (which can appear several times in the ...
3
votes
1answer
60 views

Constraint to prevent overlapping Time periods

I have a pretty simple table that stores a StartTime and an EndTime, both with the data type of Time(0). I need to enforce a constraint that prevents any overlapping. 'Touching' time periods are OK, ...
1
vote
1answer
52 views

Calculate hours based on a course schedule in mysql

I am trying to calculate user's attendance hours based on a course schedule. The user enters a room and I'm tracking in & out time. So I have the following tables user_id | room_id | ...
4
votes
2answers
186 views

MySQL: sum time ranges exluding overlapping ones

I need to sum up the time which results from multiple time ranges. For example - we have enter / exit ranges of some office: Query has to: Exclude overlapping ranges (8:00 - 10:00) Exclude ...
1
vote
0answers
17 views

Heirarchial Database with Time Tracking

Working in Python/Django 1.8 I have a problem along the following lines: Assembly Table |Part |Parent (FK to other Part) i.e.: Car |--Tire |--Bolt A |--Bolt B Journey Table |Date ...
0
votes
1answer
18 views

Create interval by string in PostgreSQL

Is it possible to create an interval by string in PostgreSQL? for example, I have a table: CREATE TABLE x ( id BIGSERIAL PRIMARY KEY, data JSONB ); INSERT INTO x(data) ...
0
votes
2answers
41 views

Define a db before coding

I'm starting to code time tracking application to replace the monthly excel sheets my company is requiring. Its purpose is standard : to centralize all data about the time spent by different(or same) ...
0
votes
1answer
34 views

Time Required For Query Execution?

So , I am new to working with databases and am unaware of their capacity in genral. To be specific , i want to know much much time would a particular mysql query take.I tried searching on the internet ...
0
votes
2answers
63 views

Getting 30 minute slots between time

I have a Start Datetime and a End Datetime. Eg: 10:00 am - 12:00 pm I have to create 4 slots between the, each ranging for 30 minutes. Eg: 10:00 am-10:30 am 10:30 am-11:00 am 11:00 am-11:30 am ...
1
vote
1answer
136 views

Extract time from date into new column

I have a varchar column named [Dato Time] which contains values like: 2011-05-12 00 2011-05-12 01 2011-05-12 02 So, a date and a Hour-specific time. I would like to split the date and the time up ...
2
votes
1answer
75 views

Mixed granularity weeks/months time series data in a data warehouse?

I'm not sure that "anti-aliasing of time series data" is the correct terminology to use, so let me explain: I have some sources of data that are aligned quarterly, mostly to do with quarterly running ...
5
votes
1answer
203 views

Time dimension or timestamp in fact table?

Which would you use, and why? A separate time dimension or putting a timestamp in a fact table? Or perhaps both? I am building a data warehouse, and need to represent the time of day that events ...
2
votes
1answer
116 views

Calculate Difference in Overlapping Time in PostgreSQL / SSRS

I'm using PostgreSQL 9.2 and SSRS 3.0. I'm trying to calculate the difference in non-overlapping time entries in a timesheet. My data looks like this: I would like this to return: I can get ...
3
votes
1answer
135 views

Any risks in updating the system time on a mysql 5.5 server?

We just discovered one of our mysql systems has not been running ntp, with the result that the time has drifted a bit. If I enable ntp, and synchronize the time while the system is running are ...
1
vote
2answers
41 views

Selecting the average of the top percent of duration, grouped by minute

I am attempting to find the average of (the top 5% of duration/ per minute). I wrote this query: select AVG(Q.duration) Avg5Perc, Q.time FROM ( select top 5 PERCENT duration, time from ...
1
vote
1answer
41 views

Order By with duration strings having time units

I have a SQLite database with a table "Rate" who has a column "timeToMaturity". This column contains strings such as : 7Months 26Days 3Years I'd like to order a query results by timeToMaturity ...
1
vote
1answer
83 views

Intervals query of huge data

My question is more or less theoretical - what is the best approch to get query data by intervals. The situation I have a system that manage counters (thousands of counters - counts consumption of ...
0
votes
1answer
87 views

Database design: handling time

I am developing a weekly timetable which ideally would allow teachers pick what subjects they teach. While most of this is fairly straightforward, from a conceptual point of view I am unsure how to ...
3
votes
1answer
45 views

MySQL intersection on one table with time type

I've a table with 4 columns: id (int), name (varchar), timefrom (time), timeuntil (time) Now I would like to have all combinations where they have an intersection on the timefrom to timeuntil. My ...
-4
votes
1answer
30 views

Get currentmilliseconds in postgres

I'm working on timestamp/datetime in my application. I'm using postgres db. What is the way to get current milliseconds (something like 1412706599000) in postgres?
0
votes
1answer
54 views

Records in a table unique period

I have the following table: +--+---------+-------+--------------+--------------+ |ID|HEADER_ID|VERSION|FROM_DATE_TIME| TO_DATE_TIME| +--+---------+-------+--------------+--------------+ | 1| ...
1
vote
1answer
542 views

Select statement for selecting every week's log record

Here is a simplified version of the table in question: +------------------------------------------------------+ | DatabaseName | LogRecordNumber | LogTimestamp | ...
1
vote
1answer
82 views

Getting Time Duration

I have a table like below: I want to get time duration for each record which SPEED is greater than 100. I written a function for that, it’s working fine , but my problem was i have millions of ...
0
votes
1answer
281 views

12 hour format time in SQL datatype

I can convert time datatype to 12 hour format using convert etc. But is there any option to save the time in 12 hour format in SQL tables using any settings or property or any other methods?
3
votes
2answers
594 views

Which of the following pieces of SQL is most efficient

I need to add the date part of GetDate() to the time part of a stored DateTime. Naively I thought I could do the following: declare @testTime DateTime = '2013-04-23 13:55:06' select cast(getdate() ...
2
votes
3answers
3k views

Can I use PHP function strtotime() in SQL queries?

I have this table, and I need to use a PHP function in the query. id time lastTime 1 08:02 2 08:04 3 08:30 I am using this query with the strtotime(), and it's not working: ...
1
vote
2answers
77 views

Time elapsed Calculation

I need to calculated time elapsed for each user to perform his part in a transaction. The sequence is: 0 -1 - B2 or 0-B3 The table looks like the following: ...
2
votes
2answers
537 views

Select different time

I looked on the internet and I found your post on the stackexchange. I will try to explain in more detail what we really need I do not know well to write English It is a system for airporttaxi id ...
2
votes
6answers
5k views

Efficiently storing irregular/repeating intervals (think calendar/events)

I am developing a service that relies on users being able to recieve messages that they themselves choose. These messages need to be stored somewhere before they are send for processing. Right now ...
3
votes
1answer
295 views

Risk of changing clocktime on MySQL server host

I have a MySQL server host that have a clock that is about 75 minutes wrong. Is there any risk in changing the hosts clock while MySQL is running? Update: Obviously NOW() and other functions ...
2
votes
2answers
1k views

How to SELECT rows with time duration stored in varchar column?

There is a column in table defined like this : duration varchar(10) It has value for duration of a MP3 file stored in it like : 52:19 (Minutes : Seconds) How can I create a SQL query, for ...
1
vote
1answer
1k views

Can we set LOCK_TIMEOUT instance- or database-wide?

It is possible to change the SQL Server's default (which is -1 or indefinite period of time) LOCK_TIMEOUT value session-wide. Is it possible to set LOCK_TIMEOUT default value server-, instance- ...
24
votes
3answers
26k views

How to combine date and time to datetime2 in SQL Server?

Given the following components DECLARE @D DATE = '2013-10-13' DECLARE @T TIME(7) = '23:59:59.9999999' What is the best way of combining them to produce a DATETIME2(7) result with value '2013-10-13 ...