Browsing Questions About timestamp (1)
If I have a PHP string in the format YYYY-DD-MM and a timestamp in MySQL, is there a good way to convert between them?
I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious?
SQL Server 2005 Auto Updated DateTime Column - LastUpdated
I have a table defined (see code snippet below). How can I add a constraint or whatever so that the LastUpdate column is automatically updated anytime the row is changed?
CREATE TABLE dbo.Profiles
(
UserName varchar(100) NOT NULL,
LastUpdate datetime …
Java: Date.getTime() not including time?
Can't understand why the following takes place:
String date = "06-04-2007 07:05";
SimpleDateFormat fmt = new SimpleDateFormat("MM-dd-yyyy HH:mm");
Date myDate = fmt.parse(date);
System.out.println(myDate); //Mon Jun 04 07:05:00 EDT 2007
long timestamp = myDate.getTime();
System.out.println(ti…
How to convert date to timestamp in PHP?
How do I get timestamp from e.g. 22-09-2008 ?
How do I convert between time formats?
I am looking to convert a mysql timestamp to a epoch time in seconds using php, and vice versa. What's the cleanest way to do this?
Convert mysql timestamp to epoch time in python
Convert mysql timestamp to epoch time in python - is there an easy way to do this?
How do you avoid adding timestamp fields to your tables?
I have a question regarding the two additional columns (timeCreated, timeLastUpdated) for each record that we see in many solutions. My question: Is there a better alternative?
Scenario: You have a huge DB (in terms of tables, not records), and then the customer comes and asks you to add "times…
mysql timestamp column
Is it possible to define a timestamp column in a MySQL table that will automatically be updated every time a field in the same row is modified? Ideally this column should initially be set to the time a row was inserted.
Cheers,
Don
Accurate timestamping in Python
I've been building an error logging app recently and was after a way of accurately timestamping the incoming data. When I say accurately I mean each timestamp should be accurate relative to each other (no need to sync to an atomic clock or anything like that).
I've been using datetime.now() as …
Are unix timestamps the best way to store timestamps?
I always use unix timestamps for everything, but am wondering if there is a better way.
What do you use to store timestamps and why?
How do you convert VARCHAR to TIMESTAMP in MSSQL?
You'd like to call a stored proc on MS SQL that has a parameter type of TIMESTAMP within T-SQL, not ADO.NET using a VARCHAR value (e.g. '0x0000000002C490C8').
What do you do?
UPDATE:
This is where you have a "Timestamp" value coming at you but exists only as VARCHAR. (Think OUTPUT variable o…
How do you get a timestamp in JavaScript?
How can I get a timestamp in JavaScript?
Something similar to Unix's timestamp, that is, a single number that represents the current time and date. Either as a number or a string.
Creation timestamp and last update timestamp with Hibernate and MySQL
For a certain Hibernate entity we have a requirement to store its creation time and the last time it was updated. How would you design this?
What data types would you use in the database (assuming MySQL, possibly in a different timezone that the JVM)? Will the data types be timezone-aware?
…
Java Timestamp valueOf
I came across a code snippet like this:
Timestamp expiryDate = Timestamp.valueOf(dateStr + " " + "23:59:59.000");
Here dateStr is a string entered by the user in a form, in the format yyyy-mm-dd. Now the behavior of Timestamp.valueOf is such that it converts non-existent dates into appropri…
Resetting the time part of a timestamp in Java
In Java, given a timestamp, how to reset the time part alone to 00:00:00 so that the timestamp represents the midnight of that particular day ?
In T-SQL, this query will do to achieve the same, but I don't know how to do this in Java.
SELECT CAST( FLOOR( CAST(GETDATE() AS FLOAT ) ) AS DATETI…
Next Page >