timestamp

Informix 7.3 - Declaring a date column data type with default as current date on insert/update

和自甴很熟 提交于 2019-12-23 03:12:16
问题 Looking for your help again Jonathan Leffler! I am creating a table on Informix 7.3 and need a timestamp field that will default to today on inserts and updates. How can I define a date/datetime/timestamp column for a table with a default value of the current time? Here is a field definition for a simple date field: column upd_date date comments "" desc "Last update date" heading "Last update date" text "Last update date" attributes ( ) There is also some other syntax in schema files that

dbExpress does not read the milliseconds part of TimeStamp fields

天涯浪子 提交于 2019-12-23 02:57:09
问题 Recently some Delphi / InterBase applications display "Record not found or changed by another user" They use the default TSQLQuery/TClientDataSet (or TSimpleDataSet) components of dbExpress. We found that in the database table, a field was stored with milliseconds by a non-dbExpress application. It looks like dbExpress did not read the milliseconds from DB, and use that truncated value in the 'where' condition of the update table SQL statement, so there was no matching record to be updated.

PHP: Timestamp difference incorrect

十年热恋 提交于 2019-12-23 02:31:38
问题 The situation I've got two timestamps. One with the start time and one with the end time. The start time is: 04:43:37 The end time is: 11:59:59 Now I am trying to get the difference between the dates like this: //define timestamps $start_time = 1297698217; $end_time = 1297724399; $time_diff = $end_time - $start_time; //display times and difference echo '<b>Start time:</b> ' . date('d-m-Y h:i:s', $start_time) . '<br />' . '<b>End time:</b> ' . date('d-m-Y h:i:s', $end_time) . '<br />' . '<b

How do I account for missing data when creating an Excel file in MATLAB?

半腔热情 提交于 2019-12-23 02:07:26
问题 I had posted a similar question related to plotting data, and now I'd like to know how to handle missing data when outputting data to an Excel file using the XLSWRITE function. I have two sets of data of different length (described in the question I link to above). I am trying to replace the smaller file with zeroes for the times when the data is missing. This is the code I tried to use: newfile2 = zeros(144,20); [ts,ifile1,ifile2] = intersect(file1(:,1),file2(:,1)); newdfile2(ifile2,:) =

Matlab: Tempo-Alignment according to Timestamps

这一生的挚爱 提交于 2019-12-23 01:52:56
问题 May be it is so simple but I'm new to Matlab and not good in Timestamps issues in general. Sorry! I have two different cameras each contains timestamps of frames. I read them to two arrays TimestampsCam1 and TimestampsCam2: TimestampsCam1 contains 1500 records and the timestamps are in Microseconds as follows: 1 20931160389 2 20931180407 3 20931200603 4 20931220273 5 20931240360 ... and TimestampsCam2 contains 1000 records and the timestamps are in Milliseconds as follows: 1 28275280 2

GROUP BY timestamp every 15 minutes including missing entries

大城市里の小女人 提交于 2019-12-22 23:14:43
问题 I want to group all reports from a given table named 'reports' by every 15 minutes, including intervals where no reports where filled. Example: id timestamp --------------------------- 1 2015-04-16 20:52:04 2 2015-04-16 20:53:04 3 2015-04-16 20:54:04 4 2015-04-16 19:52:04 5 2015-04-17 22:24:56 6 2015-04-17 22:27:09 7 2015-04-18 06:48:41 After the select query I should have: timestamp count ---------------------- 20:52:04 3 21:07:04 0 21:22:04 0 21:37:04 0 21:52:04 0 22:07:04 0 22:22:04 2 22

Update values in Mysql timestamp to a datetime value.

巧了我就是萌 提交于 2019-12-22 22:07:34
问题 I need to Update values in Mysql timestamp filed to a datetime value. for example for a field join date, currently the field type is int(11) and the values are in timestamp. I need change this fields as date time filed or create a new datetime filed , then populate the field with datetime value of old timestamp value. It can do with php code with looping . If there is any mysql query for that it will be interesting. Many thanks for all of your helps, Happy coding 回答1: Alternatively, alter the

how to convert date and time to timestamp in php?

一曲冷凌霜 提交于 2019-12-22 18:20:40
问题 i have a date '07/23/2009' and a time '18:11' and i want to get a timestamp out of it : here is my example: date_default_timezone_set('UTC'); $d = str_replace('/', ', ', '07/23/2009'); $t = str_replace(':', ', ', '18:11'); $date = $t.', 0, '.$d; echo $date; echo '<br>'; echo $x = mktime("$date"); the issue is that $x gives me the current timestamp. any ideas? 回答1: it gives error because mktime function require all values of numbers only and this function gives only date . if you try like $h =

how to calculate the time between two timestamps (PostgreSQL)

随声附和 提交于 2019-12-22 12:29:15
问题 Calculate the time between these two timestamps in PostgreSQL , create_time='2017-11-02 05:51:13' and update_time='2017-11-02 07:36:18' and display it on HH:MM:SS Format. it should display like this 01:45:04 回答1: You can try just subtracting the two timestamps, then using to_char to extract out the time portion: select SELECT to_char('2017-11-02 07:36:18'::timestamp - '2017-11-02 05:51:10'::timestamp, 'HH:MI:SS'); Output: to_char 01:45:08 Demo 来源: https://stackoverflow.com/questions/47074284

Mapping DateTimeOffset to TIMESTAMP WITH TIME ZONE in Oracle & NHibernate

回眸只為那壹抹淺笑 提交于 2019-12-22 10:58:12
问题 I can't make NHibernate successfully map the native oracle "TIMESTAMP WITH TIME ZONE" type to the CLR DateTimeOffset type. It seems that Oracle chose to completely ignore the native DateTimeOffset type and is using their own proprietary type (OracleTimeStampTZ) in their ADO.NET provider. Since NHibernate is using native CLR types (like the DateTimeOffset type) - the Oracle ADO.NET provider fails any attempt to insert a row with such a type. Do any of you have an idea how this issue can be