Most voted "timestamp" questions
A timestamp is the moment an event is recorded by a computer system. The term timestamp may also refer to Unix Time or to the timestamp data type.
Learn more…82 questions
Sort by count of
-
45
votes2
answers19996
viewsHow is the timestamp calculated?
The timestamp is the numerical representation of a date and is widely used in programming languages and in databases. I want to know: How is this calculation made? Is there any standardization for…
-
23
votes6
answers28585
viewsHow to get Timestamp in Javascript?
I’d like to know how I do in JavaScript to obtain the Timestamp? A number that represents the current date and time. I know we got the object for date and time through: var d = new Date(); But I…
-
19
votes4
answers35413
viewsHow to check events between 2 dates in Mysql?
Knowing I have a table called eventos, and this table has the columns id, titulo, inicio and fim. The columns inicio and fim are of the type timestamp, where the date and time of the start and end…
-
16
votes2
answers8360
viewsWhat do GMT and UTC stand for?
I recently discovered Unix Timestamp and I came across the acronyms GMT and UTC, I would like to know what they mean. I’ve already done some research, but I didn’t find anything very clear.
-
10
votes2
answers7796
viewsUse timestamp with or without Timezone in postgresql?
Use timestamp with or without Timezone in Postgres? The web application will be used in different countries, so I will have to deal with different time zones. The system has data entry from several…
-
10
votes4
answers271
viewsJavascript equivalent of "Date.now()" in C#?
Here speaks how to get milliseconds using Date.now();, that returns something like 1533144170651. Follows his documentation: The method now() returns the milliseconds since January 1 1970 00:00:00…
-
8
votes1
answer528
viewsORDER BY only day without hour
In Mysql I have a column timestamp calling for dia_cadastro (2016-06-21 11:27:32), in consultation I want to give a ORDER BY only on the day, and disregard the time. That is, if they have products…
-
7
votes1
answer1853
viewsWhat does the number returned by System.currentTimeMillis represent?
I went to read the documentation, made available by IDE and came across this: It is said that the method System.currentTimeMillis returns: the Difference, measured in milliseconds, between the…
-
6
votes1
answer237
viewsHow to convert a value in UNIX type Timestamp to Datetime?
How to convert a value to type UNIX timestamp (seconds since 1970), example 1396148400, in a DateTime?
-
6
votes2
answers2105
viewstimediff() limited to 838:59:59, how to resolve?
SGBD: MYSQL Problem: I am adding HOURS to a TIME field type and the expected result is above 838:59:59, but is visible only up to this limit. How to solve? SELECT he.empresa,…
-
6
votes2
answers2441
viewsConvert date and time to numeric value in Javascript
I saw in the Kibana dates are treated as numerical values. For example, the date 2016-05-03T10:00:00 is equal to the numerical value 1462280400000. I would like to understand how this works, and…
-
5
votes2
answers398
viewsConvert date to Unix timestamp
I have a table in a Mysql database that has a date column VARCHAR, guy 20-09-2017 and I need to migrate this column to a column bigint(8) using the date format timestamp unix. How to do this?…
-
4
votes3
answers347
views -
4
votes2
answers1326
viewsHow to work with timezones without using a timestamp?
I was reading that answer, of the Stack Overflow in English, and I came across the following excerpt: For Mysql (or Mariadb), if you don’t need the time information consider using the DATE column…
-
3
votes1
answer703
viewsPicking up Timeinmillis and using Timestamp
Doubt: I know two ways and capture one TimeInMillis() does anyone know the difference and what is the most efficient? What if there is a third way to capture that value? Option 1:…
-
3
votes2
answers1038
viewsJava Timestamp and Mysql Timestamp
Problem: I’m storing a timestamp in MYSQL, but when I reset this timestamp I’m losing the thousandths. Java timestamp with thousandths. MYSQL timestamp without thousandths. Why does this occur? How…
-
3
votes1
answer3636
viewsConvert timestamp value to date
I have a value timestamp one-date, 1389135600, how can I convert this value to a date of this kind 27/12/2014.
-
3
votes1
answer2998
viewsTimestamp update automatically with current date
I wonder if it is possible, when one is made INSERT in a given table, automatically update the value of another column of the TIMESTAMP type called date with the current date and time, similar to…
-
3
votes1
answer1362
viewsHow to convert from Timestamp to Calendar?
I need to convert a resultSet of the returning bank in Timestamp in a Calendar type variable.
-
3
votes2
answers479
viewsHandling dates in AWK scripts
CONTEXT: I have a CSV file from which I want to extract and process some columns. I realized that AWK would be the perfect tool for this and everything was fine until I had to deal with timestamps -…
-
3
votes3
answers379
viewsHow to convert database timestamp to fill a datetime-local field?
I need to fill in a field: <input id="date" type="datetime-local" class="form-control" value="{{$task->date}}" name="date"> The return comes in format timestamp ("2016-09-20 10:00:00"), is…
-
3
votes2
answers195
viewsHow to convert a string with minutes/month/year to Timestamp?
I am making a code for testing only. In it, I have the following String: String tempo = "1s"; //1 segundo This string is modified all the time: String tempo = "30d"; //30 dias So I want to convert…
-
3
votes3
answers952
viewsSave date in Brazilian format in Postgresql
I have a Postgresql database on the Windows Azure server that is set to the Brazilian standard. If I do an SQL and run directly in Pgadminiii there from the server and run, the date is saved in…
-
3
votes2
answers3800
viewsLong or Date in JSON
Applications, one server and several customers, POST and GET to the server exchange objects JSON. One of the variables that goes along with the JSON is the datahora atual, see different Strings to…
-
3
votes1
answer162
viewsHow to convert /Date(1533524400000-0300)/ to PHP
I receive as return from a JSON the date in this format: /Date(1533524400000-0300)/ How to Connect to a DateTime in PHP?
-
3
votes1
answer93
viewsUnixtimestamp for Date Javascript
I am receiving a JSON in which the date is being returned in this way: /Date(1563568740000+0200)/ I believe it is Unixtimestamp, but I can not convert it to format Date javascript. I’ve tried to do…
-
3
votes2
answers1343
viewsHow to calculate runtime in PHP
I would like to know how long it takes for a certain function, loop loop, etc... to be executed. I use the function microtime(), but I am a little lost to know exactly what time was spent. And my…
-
2
votes2
answers800
viewsCheck if a sequence of numbers corresponds to a valid timestamp
I need to check if a sequence matches a valid timestamp. Use is_numeric, ctype_digit, will only validate if it is numerical... I want to know if the timestamp matches a date.…
-
2
votes1
answer5224
viewsDefault Timestamp Mysql
How do I put the field value by default timestamp current? Precise alterar my table to add a field timestamp not null that has by default the current, with this I need all previous registrations to…
-
2
votes1
answer59
viewsConvert Datetime to unixtime
Good morning guys, can anyone help me? I have a Java application and I need to do a conversion.. Where is localDate for unixtime.. How can I do that? This is my localDate: for (Telemetry telemetry :…
-
2
votes1
answer3273
viewsInsert data into mysql, in a timestamp field
How do I enter information in a field of this type? The name of the field is duration, I would like an example..
-
2
votes2
answers2208
viewsSQL to compare hours and minutes when Timestamp in Postgresql
I am trying to compare 2 timestamp fields, which have different dates, ignoring the dates and using only the hour/minute simultaneously, to know, within a same day which of them is bigger. EX:…
-
2
votes1
answer971
viewsSQL date filter on timestamp
I have the following query: SELECT name, commission, timestamp, state_name FROM magry_awoaffiliate_commission c INNER JOIN magry_users u ON (c.user_id = u.id) INNER JOIN magry_virtuemart_userinfos v…
-
2
votes1
answer1446
viewsHow to insert time into Oracle?
I need to save only the hour and minutes (seconds make no difference, so having or not, whatever) I should use TIME or TIMESTAMP ? I started doing with TIMESTAMP(6), but I’m having a hard time…
-
2
votes1
answer3604
viewsHow to get only time of timestamp?
I have a column timestamp on my table and I need to get only the time of these values. Example of how you are registered: 30.12.1899 17:03 Example of how I need to display through select: 17:00 I…
-
2
votes2
answers724
viewsParsing a timestamp with Timezone
I was making a little code to implement a treatment case in a friend’s application module and got stuck with a problem. This is a unitary test. To put in the application module I would have to make…
-
2
votes1
answer2791
viewsCheck if date is between two dates in the 30 min range
I have a service that before saving some value in the bank, it is necessary to be checked if it is within some period already saved in the bank. Each period consists of half an hour. ex: 10:00 10:30…
-
2
votes1
answer195
viewsFirestore Timestamp
I’m doing a show with Firestore of a record. When the date is saved in the database, it is saved as Timestamp (For example: Timestamp(Seconds=149914800, nanoseconds=0)), but when I open the plug…
-
2
votes2
answers120
viewsCapture time range in UNIX
I am trying to capture in UNIX data format the 1 day time range: #!/usr/bin/python # -*- coding: utf-8 -*- import time import datetime from datetime import datetime now = datetime.now() dateNow = ''…
-
2
votes1
answer433
viewsPython Pandas: Dataframe convert Timestamp column to Datetime
How can I convert a Dataframe column from Timestamp to Datetime? btc_df = pd.DataFrame ( bars_day , columns=['date' , 'volume' , 'open' , 'high' , 'low' , 'close'] ) Summary date int64 volume object…
-
2
votes2
answers72
viewsHow to filter an array with Timestamp elements?
I need to create filters for a chart and I am using lib Highcharts only on the front. Data is being consumed from an API in an array of arrays like this: [ [ 1565308800000, 24960 ],[ 1565568000000,…
-
1
votes2
answers412
viewsProblems to convert data mon dd yyyy hh:mm
I made a select in SQLSERVER inside php: mssql_query(SELECT TOP 1 ven.DATA FROM tab_venda ven (nolock) INNER JOIN dbo.tab_item_venda iven (nolock) ON iven.num_Venda = ven.NUM_VENDA INNER JOIN…
-
1
votes2
answers720
viewsUpdate date at each update in a table
I have a table pessoa. In it I have a field called pe_modified which aims to have the date of the last modification in the table. Instead of me having to update on the query, is it possible to be…
-
1
votes2
answers18294
viewsHow to get the date right using momentjs
Personal talk. I’m having some trouble trying to use the momentjs library to work with dates. My problem is described below. ****--------- Datetime ----------**** Timestamp recebido do banco de…
-
1
votes3
answers681
viewsConvert Stamp time to full date with php
I have on my bench a field with timestamp datetime and I need to convert the timestamp for this format example: WEDNESDAY, DECEMBER 31, 1969 posted at 3:30 pm I searched here and found a code, but I…
-
1
votes1
answer1293
viewsInsert type timestamp into Firebird database
Error in the insert in Firebird database, field DataCadastro type timestamp unaccepted string. INSERT INTO VENDA(CODIGO, NRO_VENDA, DATA_VENDA, VALOR_TOTAL_PRODUTOS, VALOR_ACRESCIMO, VALOR_DESCONTO,…
-
1
votes1
answer380
viewsCalendar is not working properly
My conversion from timestamp to Calendar was done, apparently successfully, as the data presented appeared correct except the day of the week. data=(java.util.Gregoriancalendar)…
-
1
votes1
answer392
viewsTime on timestamp
Talk it up, boys, it’s all right? Is it possible I know how much two hours in conversion timestamp? On this line I convert the current time to timestamp. $hours_2 = str2time(localtime()); But I need…
-
1
votes1
answer38
viewsHow to change a table indicating that data from a certain field can only vary from date 1 to date 2?
I have a table called "LOC_VEICULO" where the vehicle data are contained. I have the following field: DT_FABRICACAO (DATE), where the dates of manufacture of vehicles are stored. I need to change…
-
1
votes2
answers1690
viewsError Datepipe Angular 6
I just upgraded my Angular 5 application to Angular 6. When saving a record in the Firebase database using mat-datepicker checking in the database I noticed that is correctly saving the date with…