Questions tagged [timestamp]

1

votes
1

answer
36

Views

getting milliseconds out of AHK [yes, i know that has been asked before]

how do i add milliseconds to the AHK script below? i have been researching and can't find a way - or better yet, don't understand some of the solutions posted in SOF... nor do i know enough about any kind of programming. can you help? how would i get milliseconds in this? runwait, net time /setsnt...
user3182310
1

votes
2

answer
14.8k

Views

Subtraction of Timestamps teradata

I am trying to find difference between 2 timestamps in teradata. I am using the following code: (date1-date2)day(4) to second as time_diff This is giving the error: Interval Field Overflow. What could be reason for that? Is there some other way to calculate the difference between 2 timestamps? And...
user2862496
1

votes
0

answer
9

Views

Insert one instance in mysql with zf1

I work currently under zend framework 1.12 I would like to insert a hash of timestamp into mysql table (zb_table) via API I am looking for a mechanism of insertion , such kind for each insertion I must make sure that there was no other insertion at the same time The order of insertion is important...
NF38
1

votes
1

answer
392

Views

R - how to convert JavaScript timestamp to human date time with as.POSIXct?

How can I convert a timestamp in this format to human date? I create the timestamp using javascript: Date.now(); Output example: 1468833354929 Then I store it in a db. So when I try to convert it with R: date
laukok
1

votes
2

answer
4.1k

Views

Converting timestamp to Calendar in Java [duplicate]

This question already has an answer here: Convert Epoch seconds to date and time format in Java 5 answers I want to get the year, month, date and hour from a long timestamp value. I found many examples of creating a Calendar from a timestamp value, but I don't get what I want. I wrote the followin...
Adrián Juárez
1

votes
1

answer
111

Views

Is a java long enough to store epoch time in microseconds?

Can I use a java long to store with reasonable precision the epoch time in microseconds with out any special signed to unsigned conversion tricks? If so how would I calculate the end date range? This is the usual 8 byte date range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 UPDATE From...
simgineer
1

votes
1

answer
2.5k

Views

Java TIMESTAMP has trailing zeros, how do I remove?

I'm using Java with hibernate and am in the early stages of learning how everything works. I'm getting there slowly but I have had some trouble with dates in Java. My current problem is that when I get a timestamp from a MySQL database it seems to have a load of extra zeros on the end. When I pass t...
diggersworld
1

votes
2

answer
60

Views

Negative timestamp in db

I am working with php and I need to store a timestamp. I read a lot about timestamp but i don't understand why : '01/01/1970 00:04:00' = -3600 (source: http://www.timestamp-tool.fr/) It should be 3600 ? Thank you.
Dgrey
1

votes
2

answer
176

Views

INSERT TIMESTAMP or DATETIME fails when month, day, hour or min is 8 or 9

I'm having a strange problem while dealing with inserting datetime values. it happens while inserting DATETIME or TIMESTAMP type columns, as well as when using STR_TO_DATE function. it seems that the database cannot parse correctly when the month, the day, the hour or the minute are number 8 or 9. S...
agregorio
1

votes
1

answer
182

Views

Converting day lights savings time string to timestamp gives wrong results

I have a pyspark data frame. In this data frame I have a column called test_time which is of string datatype >>> df DataFrame[test_time: string] df.show() +-------------------+ | test_time| +-------------------+ |2017-03-12 02:41:06| |2017-03-12 02:43:52| |2017-03-12 02:56:32| |2017-03-12 0...
User12345
1

votes
0

answer
101

Views

JasperSoft Studio - How to handle DateTimeOffset

In SQLserver we have this type DateTimeOffset witch the only diferent with DateTime is that we have an Offset of the time zone. JasperSoft Studio (6.3.0 Final) don´t work with this type as you can see: java.lang.ClassNotFoundException: microsoft.sql.DateTimeOffset cannot be found by net.sf.jaspe...
Willas
1

votes
0

answer
235

Views

Pandas DatetimeIndex issue with last week of year

Continuing on my previous question, I have another dataframe that the week column starts with 201553. When I change weekly columns to timestamp, belwo occured. Please take a look. a = pd.Int64Index([201553, 201601, 201602, 201603, 201604, 201605, 201606, 201607, 201608, 201609]) print (pd.to_datetim...
Kang
1

votes
0

answer
331

Views

How to get cookie value and also time stamp in javascript

I want to assign time stamp in set cookie and need to get it in get cookie.Here I tried to set key-value pair in set cookie and I get that value in get cookie.It works fine for me .But I want to set time stamp in set cookie.I would like to get time stamp in get cookie using javascript. Thanks in adv...
Jasmine Joseph
0

votes
0

answer
6

Views

Get First day of last month timestamp with Carbon

I want to get the timestamp in milliseconds for first day of last month and last day of last month using Carbon in laravel. I have tried to do it with carbon::parse, which is achieved. But I want to instantiate the Carbon class simply to achieve the same. This is the code that works fine with Carbo...
Shraddha Banerjee
1

votes
0

answer
163

Views

How to print out loss value at each iteration with time-stamp in logistic regression model?

I am training my input dataset by using logistic regression model. Initially, my workflow includes the implementation of logistic loss function, its gradient, predictor, weight_update, compute_cost_logistic, logistic_regression. Meanwhile, I need to print out the loss value at each iteration with a...
Dan
1

votes
0

answer
32

Views

Add timestamp to apache error.log

how can I add a timestamp to apache error.log? in the apache config-file I can change the path: ErrorLog ${APACHE_LOG_DIR}/error. log but what about adding timestamps? Thanks!
plotpoint
-1

votes
1

answer
188

Views

How to find the difference between 2 NaiveDateTimes?

I am using chrono. I have now() and some other NaiveDateTime. How can I find a difference between them? let now = Utc::now().naive_utc(); let dt1 = get_my_naive_datetime();
Kurama
1

votes
1

answer
215

Views

Oracle 1.8 CachedRowSet.populate error where select systimestamp from dual

I have a simple question... Why this code below is not working? JDK version: 1.8.0_92 Oracle DB version: 11.2.0.1.0 Oracle JDBC driver: ojdbc6.jar ---> I could not find this java code source :( String SQL = 'select systimestamp from dual'; Statement statement = null; ResultSet rs = null; try { sta...
Jefferson
1

votes
0

answer
272

Views

EF core: cross context timestamp

I have a test project for EF Core where I am testing a MySql and a Sql server contexts. I have the following property: [Timestamp] public DateTime CreatedOn { get; set; } According to https://docs.microsoft.com/en-us/ef/core/modeling/concurrency, For SQL Server, timestamp is usually used on a byte...
Neville Nazerane
1

votes
1

answer
64

Views

String value to PrepareStatement for TimeStamp comparasion

SELECT data from table using WHERE clause for TimeStamp. I would like to set a String value retrived from TextField to show filtered table. NOT WORKING: public ResultSet queryAlarms() throws SQLException String sql = 'SELECT * FROM BDCS.dbo.Alarms WHERE AlarmTime > ?'; PreparedStatement ps = connect...
einHarJar
1

votes
0

answer
56

Views

What are Pros and Cons in using prefixes and suffixes in PostgreSQL dialect for timestamp columns

I have analysed several articles about naming conventions for Date/Time types in SQL data models. Most of them suggest implementing a database design where a timestamp type is used for some registered even values only, literally timestamping the event case just when it happens. And naturally they su...
KoichiSenada
1

votes
0

answer
837

Views

Script for auto Timestamp (Google Spreadsheet)

I need some help in making an auto updating timestamp script for my google spreadsheet. What I exactly need is that, when someone edits column A or B, a date and time will appear on column D. I tried using this script function onEdit() { var s = SpreadsheetApp.getActiveSheet(); if( s.getName() == '...
Ralph Vincent Gallego
1

votes
0

answer
47

Views

How to orderBy desc UTC time stamp column in spark scala

I need to order by desc for specific column in my spark data frame . For example here is the date time format that i want to reorder '2017-11-21T12:09:23+00:00' '2017-11-21T12:18:55+00:00' '2017-11-21T11:41:14+00:00' This is what i am doing to reorder val windowSpec = Window.partitionBy('Source_or...
1

votes
0

answer
295

Views

jOOQ requires Timestamp type to access datetime type in MySQL but this doesn't work

I have a MySQL database with data like this: These dates have data types datetime: We are using jOOQ in our project for querying MySQL. Now I need to exclude all entries older than a particular date from a result set. jOOQ demands to set a Timestamp value, and when I do it doesn't impact the result...
Václav
1

votes
2

answer
62

Views

Powershell: Copy file attributes (Creation.Time of *.AVCHD = Creation.Time of encoded *.mp4)

Good day, I use a Panasonic camcorder for recording videos and compress the *.AVCHD files to *.mp4 files using HANDBRAKE. For archiving purposes, I need to copy the original file time stamps (creation date and time) to the encoded *.mp4 files. *.AVCHD files are located in folder test1 and *.mp4 file...
Chris
1

votes
1

answer
81

Views

Django TruncMinute show timezone

I created a Django ORM query and I use TruncMinute to set seconds to zeros. Unfortunately when I run my query the result show my timezone. I attached my result with my query and I also show my desired output. My query: MyResul=MyTable.objects.all() .filter(time__range=(start_date, end_date)) .annot...
1

votes
1

answer
311

Views

Invalid default value for current timestamp field in live server

Below query works fine in my localhost but When i try to execute this query in the live server it gives sql error CREATE TABLE IF NOT EXISTS `tbl_claims` ( `id` int(11) NOT NULL AUTO_INCREMENT, `claimed_profile_id` int(11) NOT NULL, `claimed_by_profile_id` int(11) NOT NULL COMMENT 'this will be only...
Hetal Chauhan
1

votes
0

answer
51

Views

How to handle and convert null datetime field into unixtime stamp in Scala

I have some code snippet as below that is not accepted by Scala, it would be appreciated if someone can help to fix it, thanks. train_no_header is an RDD generated from a csv file, its first line is shown as below: scala> train_no_header.first res4: String = 87540,12,1,13,497,2017-11-07 09:30:38,,0...
Choix
1

votes
1

answer
38

Views

Vim timestamp in insert mode results in mapped key

I put following lines in my .vimrc: nmap i=strftime('%Y-%m-%d %a %I:%M %p') imap =strftime('%Y-%m-%d %a %I:%M %p') In normal mode, it works as expected i.e. inserts timestamp. In insert mode, however, I get inserted. What am I doing wrong and how to get it working? UPDATE: I realized that everyth...
Vallo Varik
1

votes
1

answer
37

Views

PostgreSQL formatting timestamps

I create table employees in PostgreSQL with 4 columns (employee_id, first_name, last_name and date_of_birth, all NOT NULL, and employee_id is the primary key). Now, I have 704 records in my table and add more with a for loop. For this purpose I wrote this code: DO $do$declare r text; BEGIN FOR i in...
Sharofiddin
1

votes
1

answer
238

Views

pandas: add missing timestamp into data frame with a default value

I am using the following code to put data into a data frame: import pandas as pd pd.set_option('display.float_format', lambda x: '%.3f' % x) df = pd.DataFrame(columns = ['time', 'value']) for x in data0.data: df = df.append({'time': x[0], 'value': x[1]}, ignore_index=True) df The data frame looks li...
Edamame
1

votes
0

answer
28

Views

Is it a good practise to timestamp all filenames in a multiuser website?

My pseudo code is basically, The JavaScript code reads the uploaded files and time stamps the different files with jquery.now() in a loop then uploads the file with the corresponding file objects and timestamped filename and inserts it into a MySQL database. My question is, if many users decide t...
Shuyaib
1

votes
1

answer
103

Views

timestamp difference (which is in string) in hive

How to do difference of timestamp (which is in string) in hive? I tried using date_format(column_name,'yyyy-MM-dd HH:mm:ss.sss') to convert into a timestamp but the difference is giving me a null value
Panda
1

votes
0

answer
115

Views

Android: how to get the timestamp related to a measured characteristic of a BLE heart rate GATT service?

I'm doing as the guide says and all work perfectly fine. I can discover the heart rate service from the GATT server and then get all the updates from the heart rate characteristic samples. However, is there a characteristic to get the timestamp related to each heart rate sample? Getting the System.c...
user3290180
1

votes
1

answer
1.1k

Views

Convert Unix Timestamp + add 1 hour

I am working on a countdown time for multiple row using map reactjs I did countdown for 1 hour for multiple rows. it works fine but I have no idea how to do this with real time like using new Date() I have Unix date, for example 1521827247 how can I convert it and add 1 hour, so I will be able to m...
Laura delgado
1

votes
0

answer
70

Views

Unable to read timestamp from visual dbase 7 file format

Trying to calculate date-time based on Timestamp in dBase 7 file. According to header information given in below link I tried to get 4 bytes of date and tried to convert it to date but it always throws out of range exception. I tried to use DBF viewer application and it shows the correct date. Does...
Mehul Gohel
1

votes
3

answer
39

Views

Time is not returned as dynamic because of static issue

I need to show the latest timestamp through my service class: @Service public class UserServiceImpl implements UserService { private static final AtomicInteger counter = new AtomicInteger(); private static final SimpleDateFormat sdf = new SimpleDateFormat('yyyy.MM.dd.HH.mm.ss'); static Timestamp tim...
user1529641
1

votes
0

answer
1.1k

Views

how to get nano seconds timestamp in python 3.6?

I need to send a nanoseconds timestamp to influx db (1.2). Maybe you could recommend the simple way in python 3.6 to convert current date time to nanoseconds timestamp ? Thank you
saddayz
1

votes
0

answer
45

Views

From date to timestamp python

used time and datetime. This is timestamp 15229231800000000 i need to generate it from date 05.04.2018 13:15 tried import time import datetime times = '05.04.2018 13:15' timer = time.mktime(time.strptime(times, '%d.%m.%Y %H:%M')) timer = int(timer * 10000000) print timer but it not generate that ti...
Presko
1

votes
1

answer
525

Views

How to convert a datetime string with milliseconds to UNIX timestamp

I have the following string 2013-04-12 16:00:15.041 What is the C++ way to convert this string into a 64bit UNIX timestamp? Most question on here deal with only having the timestamp until seconds but in my case I also need to include the milliseconds.
Iliketoproveit

View additional questions