tagged [timestamp]

Get records of current month

Get records of current month How can I select Current Month records from a table of MySql database?? Like now current month is January. I would like to get records of January Month, Where data type of...

22 Jan at 07:45

Add Timestamp to Trace.WriteLine()

Add Timestamp to Trace.WriteLine() In my C# .NET application I have an issue with the Trace.WriteLine()-method. I uses this method alot, and want to add a TimeStamp every time I use it. Instead of Tra...

14 May at 13:41

How to generate a UTC Unix Timestamp in C#

How to generate a UTC Unix Timestamp in C# > [How to convert UNIX timestamp to DateTime and vice versa?](https://stackoverflow.com/questions/249760/how-to-convert-unix-timestamp-to-datetime-and-vice-...

23 May at 12:16

How to get correct timestamp in C#

How to get correct timestamp in C# I would like to get valid timestamp in my application so I wrote: output: I wanted something like: ``` 20140112

14 Mar at 21:23

NOW() function in PHP

NOW() function in PHP Is there a PHP function that returns the date and time in the same format as the MySQL function `NOW()`? I know how to do it using `date()`, but I am asking if there is a functio...

13 Jul at 18:3

How can I get a request's timestamp in ServiceStack?

How can I get a request's timestamp in ServiceStack? This may seem silly but I can't find the request timestamp in ServiceStack. I'm looking for the ServiceStack equivalent of in ASP.NET MVC. I looked...

24 Mar at 22:32

Parsing unix time in C#

Parsing unix time in C# Is there a way to quickly / easily parse Unix time in C# ? I'm brand new at the language, so if this is a painfully obvious question, I apologize. IE I have a string in the for...

4 Nov at 14:46

Timestamp string length

Timestamp string length If I did this What is the maximum string length of myResult and is it always the same size?

11 Dec at 06:59

long timestamp to LocalDateTime

long timestamp to LocalDateTime I have a long timestamp 1499070300 (equivalent to Mon, 03 Jul 2017 16:25:00 +0800) but when I convert it to LocalDateTime I get 1970-01-18T16:24:30.300 Here's my code `...

3 Jul at 10:52

CURRENT_TIMESTAMP in milliseconds

CURRENT_TIMESTAMP in milliseconds Is there any way to get milliseconds out of a timestamp in `MySql` or `PostgreSql` (or others just out of curiosity)? Is there anything like this: or the only alterna...

How to convert timestamps to dates in Bash?

How to convert timestamps to dates in Bash? I need a shell command or script that converts a Unix timestamp to a date. The input can come either from the first parameter or from stdin, allowing for th...

11 Sep at 09:39

How to get the current TimeStamp?

How to get the current TimeStamp? I'm trying to get the current time as TimeStamp without success. I have this code: The output is ``` Sunday, January 25th 1970

17 Sep at 14:13

Elegantly check if a given date is yesterday

Elegantly check if a given date is yesterday Assuming you have a Unix timestamp, what would be an easy and/or elegant way to check if that timestamp was some time yesterday? I am mostly looking for so...

How to convert SQL Server's timestamp column to datetime format

How to convert SQL Server's timestamp column to datetime format As SQL Server returns timestamp like `'Nov 14 2011 03:12:12:947PM'`, is there some easy way to convert string to date format like 'Y-m-d...

18 Mar at 11:34

Java: Date from unix timestamp

Java: Date from unix timestamp I need to convert a unix timestamp to a date object. I tried this: Timestamp value is: `1280512800` The Date should be "2010/07/30 - 22:30:00" (as I get it by PHP) but i...

19 Sep at 20:1

Oracle SQL : timestamps in where clause

Oracle SQL : timestamps in where clause I need to look up rows within a particular time frame. ``` select * from TableA where startdate >= '12-01-2012 21:24:00' and startdate

13 May at 13:31

How do I automatically update a timestamp in PostgreSQL

How do I automatically update a timestamp in PostgreSQL I want the code to be able to automatically update the time stamp when a new row is inserted as I can do in MySQL using CURRENT_TIMESTAMP. How w...

28 Jan at 20:20

Python UTC datetime object's ISO format doesn't include Z (Zulu or Zero offset)

Python UTC datetime object's ISO format doesn't include Z (Zulu or Zero offset) Why python 2.7 doesn't include Z character (Zulu or zero offset) at the end of UTC datetime object's isoformat string un...

Converting unix timestamp string to readable date

Converting unix timestamp string to readable date I have a string representing a unix timestamp (i.e. "1284101485") in Python, and I'd like to convert it to a readable date. When I use `time.strftime`...

Convert unix timestamp to date in java

Convert unix timestamp to date in java How can I convert minutes from Unix timestamp to date and time in java? For example, timestamp `1372339860` correspond to `Thu, 27 Jun 2013 13:31:00 GMT`. I want...

30 Mar at 09:21

Convert Unix timestamp to a date string

Convert Unix timestamp to a date string Is there a quick, one-liner way to convert a Unix timestamp to a date from the Unix command line? `date` might work, except it's rather awkward to specify each ...

27 Jul at 07:57

How to parse unix timestamp to time.Time

How to parse unix timestamp to time.Time I'm trying to parse an Unix [timestamp](https://golang.org/pkg/time/) but I get out of range error. That doesn't really makes sense to me, because the layout i...

13 Jul at 21:44

Getting current unixtimestamp using Moment.js

Getting current unixtimestamp using Moment.js I want to get the Unix TimeStamp using Moment.js. I can find many functions which convert timestamp to date in moment.js. I know that I can easily get the...

19 Jun at 06:15

How can one change the timestamp of an old commit in Git?

How can one change the timestamp of an old commit in Git? The answers to [How to modify existing, unpushed commits?](https://stackoverflow.com/questions/179123/how-do-i-edit-an-incorrect-commit-messag...

How to read timestamp type's data from sql server using C#?

How to read timestamp type's data from sql server using C#? I get the result in .NET like this: The result is a byte array `[0]= 0,[1]=0,[2]=0,[3]=0,[4]=0,[5]=0,[6]=30,[7]=138`, but the result in SQL ...

12 Jul at 16:32