Hi;
In EJBQL how can compare two date values; suppose
"Select e from Employee e where e.start_date > :start_date"
If I set query parameter with setParameter("start_date", new Date());
An Exception occurs on running..
I wait for your suggestions
...
Maybe I'm going about this all wrong but here goes...
I'm trying to allow users of my Portlet app to input a date in whatever their localized format would normally be. I plan to parse the string date using a SimpleDateFormat object based on the user's current Locale on the backend.
I'm pretty sure that part will work (right?) but I'm ...
The following statement work at command prompt. But does not work in a cron.
myvar=`date +'%d%m'`; echo $myvar >> append.txt
The cron log shows that only a part of the date statement is run.
How do I use it in a cron?
...
Hi,
I'm using the ErrorProvider in VB.Net (2005) which is associated with a BindingSource that is bound to a custom object that I have created. This custom object contains a date field that has a "Date" data type that. I am using a "TextBox" to bind the date field in my form. My issue is, whenever the TextBox loses focus and is blank...
so I have a variable containing a date object. I want to convert it to a string in this format: dd/mm/yyyy. How could this be achieved?
...
Hi,
I have a table which containt a date, a number for the number of weeks per period, and a year. the user then enters a date and I can calculate the period number from this. But I'd like to do it the other way too: Entering a period number and get the start and end date of the period from this. Unfortunately, I can't seem to get the r...
What time is the start of a day, say 01/01/2010?
Is it 00:00:00:000 ? or is that midnight?
[edit]
It might be a stupid question but I'm confused because I used Calendar.set(Calendar.HOUR, 0) but this gives me a time of 12:00:00.
and now I've realised I should be using HOUR_OF_DAY
...
Hay, how can i turn a string like "04 Jan 2010" into a string like "1/4/2010". Can i do this with the JS date object?
Thanks
...
I'm trying to create a Date like this:
date = new Date(year-1900,mon-1,day,hrs,min,sec);
and Eclips gives me this warning: "The constructor Date(int,int,int,int,int) is deprecated".
What does it mean for a constructor to be deprecated? What can I do?
...
Hi there,
I have some experience with XSLT but now i've got myself a problem:
I need to check if a period between a begin- and enddate completely covers an other period.
Here's a part of the xml:
<Parent ID="1">
<StartDate>20050101</StartDate>
<EndDate>20060131</EndDate>
<Child ID="1">
<StartDate>20050101</StartDate>
<En...
I'm kind of at a loss here. It seems as though somehow my code is missing a whole week at the end of 2009 and I've tried a couple different things.
My base function to get the start and end date for a week is below. Given a Year, Week and Day of the Week it gives you a date.
function datefromweeknr($aYear, $aWeek, $aDay)
{
...
Hi Everybody,
I have calendar that is working fine.
Here is the function that display the full date:
def selectDate(self,date):
self.fullDate = str(date.day()) + " / " + str(date.month()) + " / " + str(date.year())
print "full date: %s" % self.fullDate
And here the code with the calendar:
def TabCalendar(self):
self.cal...
Hello!
I have a Database column with the syntax "0000-00-00 00:00:00".
In PHP I would do
date('Y-m-d H:i:s');
In Ruby, I do
require 'date'
now = DateTime::now()
puts "#{now.year()}-#{now.mon()}-#{now.mday()} #{now.hour()}:#{now.min()}:#{now.sec()}"
The result is:
"2010-1-5 10:16:4"
That's not okay. How could I create a "timestring...
Hi all,
I have a birthdate field stored in a table in the database.At present it displays the values as 2005-10-12 but i wanted to display as 10-12-2005.I have tried the following query but it doesnt display the field at all in PHP.Any suggestions will be helpful.By the way this query when executed directly on the database it is dispaly...
Hi,
While trying to transform the date format I get an exception:unparseable date and don't know how to fix this problem.
I am receiving a string which represents an event date and would like to display this date in different format in GUI.
What I was trying to do is the following:
private String modifyDateLayout(String inputDate){
...
Hello,
I've a date formatted like "Tue Jan 05 11:08:27 +0000 2010" and I want to convert it's format to "yyyy-mm-dd 00:00" in PHP.
How can I do that?
...
I must be missing something.
date1 = new Date(2010, 01, 10, 12, 10, 30, 000);
date2 = new Date(2010, 01, 10, 12, 10, 30, 000);
trace(date1 == date2); // returns false
However,
date1 = new Date(2010, 01, 10, 12, 10, 30, 000);
date2 = new Date(2010, 01, 10, 12, 10, 30, 000);
trace(date1.toString() == date2.toString()); // returns tru...
Hi,
I need to convert the date from request parameter to string in dateformat 'yyyy-MM-dd'.
I have tried the following
String MyDate = request.getParameter("DayCal");
formatdate = new java.text.SimpleDateFormat("yyyy/MM/dd");
Date date = (Date) formatdate.parse(MyDate);
String DisplayDate= formatdate.format(date);
But i am getting i...
alert(dateObj) gives Wed Dec 30 2009 00:00:00 GMT+0800
How to get date in format 2009/12/30?
...
The string can be got by getFullYear and so on.
Can it be done reversely?
...