Questions tagged [timestamp]

A timestamp is a crucial record of the exact moment an event occurred within a computer system. This notation can encompass Unix Time or be specifically associated with the timestamp data type.

Retrieve the number of days, hours, and minutes from a given

Is it possible to use JavaScript (jQuery) to calculate the number of days, hours, and minutes left before a specific future date? For example, if I have a timestamp of 1457136000000, how can I determine the amount of time remaining in terms of days, hours ...

JavaScript Date() function misinterpreting Unix timestamp

When creating the date using a timestamp retrieved from Firebase, I use the following code: let da = new Date(item.date.day); I have double-checked that item.date.day is indeed a timestamp and the correct one at that. However, regardless of the actual t ...

Node/Express: Retrieve the req.query parameter from the URL and convert it into a UNIX timestamp

Here is the URL that I am working with: In my Express app.get function, I am trying to extract 2015-12-25 from the query string and return JSON data containing a UNIX timestamp and a UTC timestamp. The structure of the JSON should be as follows: {unix: & ...

Guide to querying MongoDB for data based on date using Express

I am attempting to retrieve data from a mongoDB collection based on the creation date. Date format for retrieving data: yyyy-mm-dd (e.g. 2015-04-14) Format stored in collection: timestamp: "2015-04-13T17:50:48.761Z" Controller : $scope.getExpenc ...

Exploring time differences in Javascript

I am trying to save a JSON AJAX response from the server in the browser's localStorage for a duration of one minute, along with a timestamp generated using new Date().getMinutes(). Upon triggering $(document).ready, I aim to check the stored timestam ...

Instructions for sorting an array of objects by Firebase Timestamp

I am looking for a way to order my messages based on timestamp in Firebase v9. In earlier versions, I was able to do this but now I seem to be facing some difficulties. Here is the data structure set up on Firestore: const [messages, setMessages] = useSta ...

Can you provide me with a timestamp for the stroke of midnight today?

Can someone please guide me on how to obtain a timestamp in php for today at midnight? For instance, if it's currently Monday at 5 PM and I'm looking to get the Timestamp for the same day (Monday) at midnight (12 am). Any assistance would be greatly appre ...

converting Unix timestamp to ISO timestamp

Below is the code snippet I am currently working on: import psycopg2 import datetime conn = psycopg2.connect(database="sample", user="postgres", password="", host="localhost", port="5432") cur = conn.cursor() print "Opened database successfully" ii=0 wi ...

What is the best way to retrieve time from a MySQL timestamp in ActionScript 3?

I need help displaying an ActionScript 3.0 Timer, based on a timestamp retrieved from MySQL. Imagine that PHP returns a string like $my_birthday="2013-05-22 12:30:45". I fetched it in ActionScript using a URLLoader, and now I want to present the timer in ...

What is the best way to organize objects based on their timestamps?

I am faced with the task of merging two arrays of objects into a single array based on their timestamps. One array contains exact second timestamps, while the other consists of hourly ranges. My goal is to incorporate the 'humidity' values from t ...

Converting a whole number into a timestamp using Python

After struggling with converting the list l: l = [0, 1] into timestamps corresponding to the indexes of dataframe df: dt val 2017-11-13 00:00:00 8 2017-11-13 01:00:00 17 Ideally, I want the result to be: l = [2017-11-13 00:00:00, 2 ...

Organize logging messages on a per-second basis for better readability

Developed a logger responsible for logging certain canbus values to a file in seconds-based timestamps. A sample of the log is as follows: Timestamp, Can ID, data, datalength 07-Nov-22 13:40:41, 418385469, a00f325bffffffff, 8 07-Nov-22 13:40:41, 217056317, ...

What is the process for converting an Angular UTC timestamp to a local timestamp?

Is it possible to convert a UTC timestamp to a local time timestamp using any function or method? I am sending the timestamp to angular moments, but the server's timestamp is in UTC. ...

Converting Epoch timestamp to AM/PM format in a React render function

I am currently working on a personal project using React.js. I have successfully fetched an API, and one of the values returned is an Epoch timestamp. My goal is to display this timestamp in a human-readable format such as am/pm. The Epoch timestamp is dis ...

choose timestamp that is earlier than

Is there a way to retrieve items from a database that are more than 12 hours old? I'm using a timestamp column to keep track of time, but I only require information based on hours and not year, month, or day. I've tried the following query, but it's not ...

AngularFire2 Firestore Custom Query: retrieve documents based on current date and time.startTime

Welcome to the world of AngularFire2 and Firestore! My objective is clear: Query data from Firestore where startTime matches currentDateRange. I am facing some challenges with creating a dynamic query in Firestore. After going through the official docume ...

Guide to organizing the table according to the values (timestamps) in a specific column

In one of the tables I'm working with, there is a column called uploadedOn. You can see it in action here: https://stackblitz.com/edit/angular-ivy-tntvst?devToolsHeight=33&file=src/app/app.component.ts 1: https://i.stack.imgur.com/aQ6wh.png. My g ...

Converting timestamps: Retrieve day, date, hour, minutes, etc. without utilizing the "new Date()" function

Currently developing a web-app and faced with the challenge of displaying items in a list correctly. I am working on converting the timestamp attached to each item into a readable format. For instance, 1475842129770 is transformed into Friday, 07.09.2016 ...