Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

Monday, June 11, 2012

Formatting a date in JavaScript


I noticed that JavaScript's new Date() function is very smart in accepting dates in several formats.

java.util.Date to XMLGregorianCalendar


Isn't there a convenient way of getting from a java.util.Date to a XMLGregorianCalendar?

Wednesday, May 23, 2012

Why is subtracting these two times (in 1927) giving a strange result?


If I run the following program, which parses two date strings referencing times one second apart and compares them:

Thursday, May 17, 2012

Monday, April 23, 2012

The correct Javascript Date.parse(…) format string?


What is a culture-invariant way of constructing a string such that the Javascript Date() constructor can parse it and create the proper date object?

Friday, April 6, 2012

PHP How to find the time elapsed since a date time?


How to find the time elapsed since a date time stamp like 2010-04-28 17:25:43 , final out put text should be like xx Minutes Ago / xx Days Ago

Saturday, February 25, 2012

How to auto insert Current DATE in SQL with Java / Hibernate


I need to add automatically the current date into my Database when I create a new OperantionBank. I'm using Hibernate. Thanks

Tuesday, February 14, 2012

unexpected output while converting a string to date in java


I have a string "12/9/2010 4:39:38 PM" which i have to convert to a date object. I am using the following code to do it:

Sunday, February 12, 2012

How do I determine if a string is date format?


I have some strings like this: 2012-02-05T07:42:47.000Z mixed with other strings. It is always in this format. (but the numbers are not the same, of course...the times are different) (not Sun, 05 Feb 2012 07:42:47 GMT )

Wednesday, January 18, 2012

Is there a jQuery time/calendar plugin for manipulating dates?


I need to work with dates, adding/subtracting hours and days. With the JavaScript date object this is a bit difficult, since there is only get/set and no add method.

Friday, January 13, 2012

Check if $date is equal to 0000-00-00 00:00:00


I want a logic if $due is equal to no date then I want data starting with 2000. My code below is not working.