I need to add 30 minutes to values in a Oracle date column. I do this in my SELECT statement by specifying "to_char(date_and_time + (.000694 * 31)", which works fine most of the time. But not when the time is on the AM/PM border. For example, adding 30 minutes to "12:30" [which is PM] returns "1:00" which is AM. The answer I expect i...
For a rigorous marker of the source database state, I'd like to capture the @@DBTS
of an external database in a sproc. Yeah, I think I could issue
USE ExternalDB
GO
SELECT @myVarbinary8 = @@DBTS
GO
USE OriginalDB
GO
but, even if I could, it seems ugly.
For now, I've embedded a scalar-valued function in the source database to i...
http://geekswithblogs.net/michelotti/archive/2007/12/17/117791.aspx
I'm using ASP.NET with C# and trying to use linq to sql to update a data context as exhibited on the blog linked above. I created the timestamp field in the table just as stated and am using the following method:
private void updateRecord(TableName updatedRecord)
{
c...
I want to output a timestamp with a PST offset (e.g., 2008-11-13T13:23:30-08:00). java.util.SimpleDateFormat does not seem to output timezone offsets in the hour:minute format, it excludes the colon. Is there a simple way to get that timestamp in Java?
// I want 2008-11-13T12:23:30-08:00
String timestamp = new SimpleDateFormat("yyyy-MM-...
Obviously it gets updated during a write operation, but are there any non-destructive operations that also force an update? Basically looking to be able to do the equivalent of the *nix touch command, but in C# programmatically.
...
What do I gain by adding a timestamp column called recordversion to a table in ms-sql?
...
How do I convert an SQL Server SMALLDATETIME to Unix Timestamp?
date was stored as CAST(0x96040474 AS SmallDateTime) in MS Access DB. Data was dumped to SQL and I'm looking to convert those times to Unix Timestamps for MySQL.
Thanks
AO
...
We are using verisign's time stamp service currently, but every so often the time stamp server becomes unavailable - mostly due to our ISP failing.
We now timestamp everything we build, even simple dev builds as we had a lot of trouble with Vista not running the unsigned/unstamped files properly.
Can we setup a time stamp service to do...
Hi all,
I recently learnt that oracle has a feature which was pretty useful to me - as the designer/implementator didn't care much about data history - I can query the historical state of a record if it's available yet in the oracle cache, like this:
select *
from ( select *
from sometable where some_condition )
as of t...
I have a mysql table that relies on the unix epoch time stamp equivalent of the date of the entry to sort and filter in various parts of the website. I'm trying to implement a date picker that will enter the date into the form field in the mm/dd/yyyy format. I've been struggling with converting that date into the unix epoch format to add...
Hi All,
yesterday you had taught me to query record history within a time range here.
What more I need is to add oracle's (historical) timestamp to the results as a column. Is it possible?
Thanks in advance.
...
I'm planning to use MS entity framework for new web apps (come on EF v2!).
So does it make sense to plan ahead by adding timestamp columns to all entity tables in existing and future databases, to support concurrency checks? Is there any reason why it would be a bad idea to have a timestamp column in every table?
Note that the point is...
I have a sqlite (v3) table with this column definition:
"timestamp" DATETIME DEFAULT CURRENT_TIMESTAMP
The server that this database lives on is in the CST time zone. When I insert into my table without including the timestamp column, sqlite automatically populates that field with the current timestamp in GMT, not CST.
Is there a wa...
I have Informix database with timestamp field defined as YEAR TO SECOND.
When I show this field using JDBC rs.getString(column) it uses format with miliseconds so this field looks like:
2008-12-18 13:58:14.0
I would like it to use only YEAR TO SECOND fields. I set environment variable:
GL_DATETIME=%Y-%m-%D %H:%M:%S
but even then I go...
What would you recommend using between a datetime and a timestamp field, and why? (using mysql). I'm working with php on the server side.
...
I have a page that is currently using the datetime microformat to display a timestamp, but I have only been showing the human-readable time for my own time zone:
<abbr class="published" title="2009-01-09T09:16:00-05:00">
Friday, January 9, 2009 at 9:16 am (EST)</abbr>
What I'd like to do is rewrite the innerHTML for the abbr tag to be...
In Oracle 10g I have a table that holds timestamps showing how long certain operations took. It has two timestamp fields: starttime and endtime. I want to find averages of the durations given by these timestamps. I try:
select avg(endtime-starttime) from timings;
But get:
SQL Error: ORA-00932: inconsistent
datatypes: expected ...
The answers to this question describe a way to amend previous commit messages that haven't yet been pushed upstream. The new messages inherit the timestamps of the original commits. This seems logical, but is there a way to also re-set the times?
...
Is there anyone sitting on a PHP function to convert a date of format 0000-00-00 00:00:00(datetimesql) to unix timestamp?
Thanks in advance.
...
How can I convert from a unix timestamp (say 1232559922) to a fractional julian date (2454853.03150).
I found a website ( http://aa.usno.navy.mil/data/docs/JulianDate.php ) that performs a similar calculation but I need to do it programatically.
Solutions can be in C/C++, python, perl, bash, etc...
...