Search Results

Search found 1503 results on 61 pages for 'timestamp'.

Page 6/61 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Convert MYSQL Timestamp to time_t

    - by Kewley
    I'm writing a multi-threaded program that needs to be able to check if a row requires updating and act accordingly. I had problems using the built in date/time functions of MySql and so decided to just store the "lastupdate" timestamp as an integer in the table. However, I'm having problems converting this timestamp to time_t so that I can use the time functions with it. Any help is greatly appreciated.

    Read the article

  • how to find difference between two timestamp using hibernate query language

    - by Shekhar
    Hello I am trying to write an hql query which gives me the number of hours between two timestamp. So, far i am unable to do this. I have used hql hour function but that does not work if the timestamp corresponds to different date. Please provide any input. My hql query is select count(*) from com.xxx.Request as request where request.id = :id and hour(current_timestamp - request.lastEventDate) :delay Thanks Shekhar

    Read the article

  • SQL query for select distinct with most recent timestamp first

    - by Josh
    I have a mysql table with three columns: username, location, timestamp. This is basically a log of user activity of what location they are in and the time that they were there. What I want to do is select a distinct username+location where only the most recent item (by timestamp) is provided. So say the table consists of: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00 tom roomtwo 2011-3-25 08:30:00 pam roomone 3011-3-25 07:20:23 I would want only these to be selected: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00

    Read the article

  • Common way to compare timestamp in oracle, postgres and SQL Server

    - by Pratik
    I am writing a sql query which involves finding if timestamp falls in particular range of days. I have written that in the postgres but it doesn't works in Oracle and SQL Server: AND creation_date < (CURRENT_TIMESTAMP - interval '5 days') AND creation_date >= (CURRENT_TIMESTAMP - interval '15 days') Is there are common way to compare the timestamp across different databases?

    Read the article

  • Get Windows Last Reboot Timestamp?

    - by David.Chu.ca
    I have a PC on remote connected by network, but it occasionally crashes or is restarted by remote users. After the restart, some services and applications have to be in running status. So I would like to find out the reboot as soon as possible. I think PS may be a good choice with some scripts so that I could make remote call to get the last reboot timestamp information. Is there any way to get a remote Windows XP last reboot timestamp by using PowerShell 2.0?

    Read the article

  • Linq, how to specify timestamp condition?

    - by 5YrsLaterDBA
    I have a logins table which records all login and logout activities. I want to look at all login activities of a particular user within 24 hrs. how to do it? something like this: var records = from record in db.Logins where record.Users.UserId == userId && record.Timestamp <= (DateTime.Now + 24) select record; record.Timestamp <= (DateTime.Now + 24) is wrong here. I am using C# 3 + L2E.

    Read the article

  • How to round current time in teradata and insert into timestamp(6) feilds

    - by user3471254
    I have a table with date fields of timestamp(6) fields . create table test_time ( t1 timestamp(6) format 'mm/dd/yyyy hh:mm:si' , ); I want to insert into this table with current date and time rounded. i.e. say for example if the current date time is 08/07/2014 10:34:56 then the value in the table should be 08/07/2014 10:00:00 . (or) if current data and time is 08/07/2014 10:54:56 then also the value should be 08/07/2014 10:34:56

    Read the article

  • how not to update timestamp field

    - by GOsha
    project is written on php. There is timestamp field in mysql it updates automatically. In one case I don`t need update this field. Can I gibe instruction not to update this field in this queries without getting timestamp value.

    Read the article

  • mysql syntax error for timestamp

    - by eyecreate
    I have this piece of SQL that is being fed to Mysql. CREATE TABLE pn_history( member INT, action INT, with INT, timestamp DATETIME, details VARCHAR(256) ) But is comes back as an error about the syntax. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'with INT, timestamp DATETIME, details VARCHAR(256) )' at line 4 Why is this failing?

    Read the article

  • Parsing timestamp with Python2.4

    - by jellybean
    I want to parse a timestamp from a log file that has been written via datetime.datetime.now().strftime('%Y%m%d%H%M%S') and then compute the number of seconds that have passed since this timestamp. I know I could do it with datetime.datetime.strptime to get back a datetime object and then compute a timedelta. Problem is, the strptime function has been introduced with Python 2.5 and I'm using Python2.4.4 (an upgrade is not possible in my context). Any easy way to do this?

    Read the article

  • Extract time part from TimeStamp column in ORACLE

    - by RRUZ
    Actually i' am using MyTimeStampField-TRUNC(MyTimeStampField) to extract the time part from an timestamp column in Oracle. SELECT CURRENT_TIMESTAMP-TRUNC(CURRENT_TIMESTAMP) FROM DUAL this return +00 13:12:07.100729 this work ok for me, to extract the time part from an timestamp field, but i' m wondering if exist a better way (may be using an built-in function of ORACLE) to do this? Thanks.

    Read the article

  • Parsing timestamp with retarded Python

    - by jellybean
    I want to parse a timestamp from a log file that has been written via datetime.datetime.now().strftime('%Y%m%d%H%M%S') and then compute the number of seconds that have passed since this timestamp. I know I could do it with datetime.datetime.strptime to get back a datetime object and then compute a timedelta. Problem is, the strptime function has been introduced with Python 2.5 and I'm using Python2.4.4 (an upgrade is not possible in my context). Any easy way to do this?

    Read the article

  • PHP UTC Timestamp Creation

    - by Ajith
    I am using ubuntu(apache) for my php application.i need to create a timestamp for authenticated call of a webservice.In php i getting only 10 digit timestamp like 1273229733.But i need to create like 1273229613000 .How can i solve this problem.help me please.

    Read the article

  • git rebase without changing commit timestamps

    - by Olivier
    Would it make sense to perform git rebase while preserving the commit timestamps? I believe a consequence would be that the new branch will not necessarily have commit dates chronologically. Is that theoretically possible at all? (e.g. using plumbing commands; just curious here) If it is theoretically possible, then is it possible in practice with rebase, not to change the timestamps? For example, assume I have the following tree: master <jun 2010> | : : : oldbranch <feb 1984> : / oldcommit <jan 1984> Now, if I rebase oldbranch on master, the date of the commit changes from feb 1984 to jun 2010. Is it possible to change that behaviour so that the commit timestamp is not changed? In the end I would thus obtain: oldbranch <feb 1984> / master <jun 2010> | : Would that make sense at all? Is it even allowed in git to have a history where an old commit has a more recent commit as a parent? Edit A crucial question of Von C helped me understand what is going on: when your rebase, the committer's timestamp changes, but not the author's timestamp, which suddenly all makes sense. So my question was actually not precise enough. The answer is that rebase actually doesn't change the author's timestamps (you don't need to do anything for that), which suits me perfectly.

    Read the article

  • VIDEO Streaming - How to output the video timestamp?

    - by Emmanuel Brunet
    I would like to backup an ASF video stream with the time stamp (I mean the original recording date/time) on the output stream ? Usage I convert / store my video using the mkv format (Matroska) with libx264 (video) and aac (audio) codecs. Assume the IP camera webcam user account is account, the password password $ ffmpeg -i http://admin:alpha1237@webcam/videostream.asf -c:v libx264 -s 768X432 -crf 13 -b:v 2500K -pix_fmt yuv420p -c:a libfdk_aac output.mkv This works fine on a tenvis JPT3815W camera How to I need to get the video timestamp available for display as a subtitle or other meta data field managed by standard video players, and ideally to be able to hide it or not during video reading. Does anybody knows how to achieve that ? Thanks in advance for your help.

    Read the article

  • linux/shell: change a file's modify timestamp relatively?

    - by index
    My Canon camera produces files like IMG_1234.JPG and MVI_1234.AVI. It also timestamps those files. Unfortunately during a trip to another timezone several cameras were used, one of which did not have the correct time zone set - meta data mess.. Now I would like to correct this. Proposed algorithm: 1 read file's modify date 2 add delta, i.e. hhmmss (preferred: change timezone) 3 write new timestamp Unless someone knows a tool or a combination of tools that do the trick directly, maybe one could simplify the calculation using epoch time (seconds since ..) and whip up a shell script. Any help appreciated!

    Read the article

  • How to get the millisecond value from a Timestamp field in firebird with Delphi 2007

    - by Re0sless
    I have a Firebird database (running on server version 2.1.3) and am connecting to it with Delphi 2007 using the DBExpress objects (using the Interbase driver) One of my tables in the database looks something like this CREATE TABLE MYTABLE ( MYDATE Timestamp NOT NULL, MYINDEX Integer NOT NULL, ... Snip ... PRIMARY KEY (MYDATE ,MYINDEX) ); I can add to the table OK, and in Flame Robin it shows the timestamp field as having a millisecond value. But when I do a select all (select * from MYTABLE) on the table I can not get the millisecond value, as it is always returned as 000. This causes major problems as it is part of the primary key (unfortunately I didn't design the table and don't have authority to change it). I have tried the following to get the millisecond value: sql1.fieldbyname('MYDATE').AsDateTime; sql1.fieldbyname('MYDATE').AsSQLTimeStamp; sql1.fieldbyname('MYDATE').AsStirng; sql1.fieldbyname('MYDATE').AsFloat; But they all return 14/09/2009 14:25:06.000 when formatted. How do I retrieve the millisecond from a timestamp? UPDATE: In case this helps anyone in the future, here are the drivers I tried for DBExpress and the results. Embarcadero - dbExpress Driver for Firebird (Delphi 2010 Trial Version) - Milliseconds not supported in timestamps. Chau Chee Yang's - dbExpress Driver for Firebird (Delphi 2007) - Milliseconds not supported in timestamps. UpScene - InterXpress for Firebird (Delphi 2007) - Milliseconds are supported in timestamps. DevArt - dbExpress Driver for InterBase (Delphi 2007) - Milliseconds are supported in timestamps.

    Read the article

  • Hot to configure EnterpriseLibrary.Logging to only output message and timestamp

    - by thomas nn
    I am trying to log a simple string to a log file. I only need Category, message and timestamp. Thus I have configured app.config like this: <listeners> <add name="Flat File Destination" fileName="C:\Log\Phoenix.Common.Tests\Debug.log" header="-----------------------------------------------------------------" formatter="Text Formatter" footer="" rollFileExistsBehavior="Increment" rollInterval="Midnight" rollSizeKB="0" timeStampPattern="yyyy-MM-dd" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </listeners> <formatters> <add name="Text Formatter" template="Category: {category} Message: {message} Timestamp: {timestamp}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </formatters> But I get all kind of additional stuff in my log file: Priority: 50 EventId: 50 Severity: Verbose Title:Testing Log Machine: DK-PC-P4740 App Domain: TestAppDomain: 80803a4f-8e18-47bb-901e-cdac784c8041 ProcessId: 6492 Process Name: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe How do I avoid this additional stuff? Can someone send me a link to an example that only log the message into the log file? /Thanks

    Read the article

  • MessageSecurityException: The security header element 'Timestamp' with the '' id must be signed

    - by NiklasN
    I'm asking the same question here that I've already asked on msdn forums http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/70f40a4c-8399-4629-9bfc-146524334daf I'm consuming a (most likely Java based) Web Service with I have absolutely no access to modify. It won't be modified even though I would ask them (it's a nation wide system). I've written the client with WCF. Here's some code: CustomBinding binding = new CustomBinding(); AsymmetricSecurityBindingElement element = SecurityBindingElement.CreateMutualCertificateDuplexBindingElement(MessageSecurityVersion.WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10); element.AllowSerializedSigningTokenOnReply = true; element.SetKeyDerivation(false); element.IncludeTimestamp = true; element.KeyEntropyMode = SecurityKeyEntropyMode.ClientEntropy; element.MessageProtectionOrder = System.ServiceModel.Security.MessageProtectionOrder.SignBeforeEncrypt; element.LocalClientSettings.IdentityVerifier = new CustomIdentityVerifier(); element.SecurityHeaderLayout = SecurityHeaderLayout.Lax; element.IncludeTimestamp = false; binding.Elements.Add(element); binding.Elements.Add(new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF8)); binding.Elements.Add(new HttpsTransportBindingElement()); EndpointAddress address = new EndpointAddress(new Uri("url")); ChannelFactory<MyPortTypeChannel> factory = new ChannelFactory<MyPortTypeChannel>(binding, address); ClientCredentials credentials = factory.Endpoint.Behaviors.Find<ClientCredentials>(); credentials.ClientCertificate.Certificate = myClientCert; credentials.ServiceCertificate.DefaultCertificate = myServiceCert; credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None; service = factory.CreateChannel(); After this every request done to the service fails in client side (I can confirm my request is accepted by the service and a sane response is being returned) I always get the following exception MessageSecurityException: The security header element 'Timestamp' with the '' id must be signed. By looking at trace I can see that in the response there really is a timestamp element, but in the security section there is only a signature for body. Can I somehow make WCF to ingore the fact Timestamp isn't signed?

    Read the article

  • Storing a jpa entity where only the timestamp changes results in updates rather than inserts (desire

    - by David Schlenk
    I have a JPA entity that stores a fk id, a boolean and a timestamp: @Entity public class ChannelInUse implements Serializable { @Id @GeneratedValue private Long id; @ManyToOne @JoinColumn(nullable = false) private Channel channel; private boolean inUse = false; @Temporal(TemporalType.TIMESTAMP) private Date inUseAt = new Date(); ... } I want every new instance of this entity to result in a new row in the table. For whatever reason no matter what I do it always results in the row getting updated with a new timestamp value rather than creating a new row. Even tried to just use a native query to run an insert but channel's ID wasn't populated yet so I gave up on that. I've tried using an embedded id class consisting of channel.getId and inUseAt. My equals and hashcode for are: public boolean equals(Object obj){ if(this == obj) return true; if(!(obj instanceof ChannelInUse)) return false; ChannelInUse ciu = (ChannelInUse) obj; return ( (this.inUseAt == null ? ciu.inUseAt == null : this.inUseAt.equals(ciu.inUseAt)) && (this.inUse == ciu.inUse) && (this.channel == null ? ciu.channel == null : this.channel.equals(ciu.channel)) ); } /** * hashcode generated from at, channel and inUse properties. */ public int hashCode(){ int hash = 1; hash = hash * 31 + (this.inUseAt == null ? 0 : this.inUseAt.hashCode()); hash = hash * 31 + (this.channel == null ? 0 : this.channel.hashCode()); if(inUse) hash = hash * 31 + 1; else hash = hash * 31 + 0; return hash; } } I've tried using hibernate's Entity annotation with mutable=false. I'm probably just not understanding what makes an entity unique or something. Hit the google pretty hard but can't figure this one out.

    Read the article

  • What's the SQL function for timestamp manipulation?

    - by Eric Leroy
    I'm new to SQL and the time functions are different than mySQL so I'm having a terrible time finding a good site reference with USEFUL timestamp queries. I'm not able to locate the correct way of doing this query in SQL: Id Timestamp ----------------------------------- 1145744 2012-10-10 18:15:11.500 1145743 2012-10-10 18:15:11.313 1145742 2012-10-10 18:15:11.313 1145741 2012-10-10 18:15:11.253 1145740 2012-10-10 18:15:11.190 1145739 2012-10-10 18:15:11.190 1145738 2012-10-10 18:15:11.127 1145737 2012-10-10 18:15:11.067 1145736 2012-10-10 18:15:11.063 1145735 2012-10-10 18:15:10.940 1145734 2012-10-10 18:15:10.817 SELECT * from table WHERE Timestamp ... RANGE I need the range of 2 timestamps so I can select rows by the following parameters: second range minute range hour range day range week range month range year range Is there one function to put in 2 timestamps and get the range? or is this a mix of functions I need? Any good site references would be greatly appriceated. MSDN site isn't helping me isolate the proper way of doing this. I've been searching for about an hour trying to get the last day from 1:30PM to 1:30PM today.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >