date

Grouping XML nodes by Month and Year in XSLT

Update I'd like to appologize to the people who provided answers, I seem to have caused all sorts of confusion. To avoid complicating things even further, I've removed the previous code and have added new information. Read on... I'm working on a custom Blog in Umbraco. Umbraco spits out XML as the output which is then read using XS...

Query>Checking with Today Date in VB

I have created the database in Microsoft Access with this query SELECT * from booking WHERE BOOK_DATE = DATE() order by book_time* it returns 3 records which has BOOK_DATE = today date but... when i tried to place it in the Visual Basic with Data Control and DBGrid, i enter the query in the RecordSource property, but the data didn...

Search in MySQL Database based on Date Range provided by the user

I'm a novice in PHP & MySQL coding and still working my way through it.. So, little help on this will be much appreciated: I have a table that keeps record of certain events. Here is how my table looks like: Id - Event_Name - Event_Date - Event_Charges --------------------------------------------- 1 - Event 1 - 10/10/2010 - $100 2 -...

use WHERE CLAUSE for search data from A date until B date

lets say i have two drop down list and one button on my search page: From <select id="1stdate"> Until <select id="2nddate"> <input type="button" id="search"> i want to search data from 1stdate until 2nddate, how to use WHERE CLAUSE for this case? for ex. i want to search data "from 09-2010 until 11-2010". this my query: SELECT CONCAT...

MySQL: count data from A month until B month

regarding to this question, i have a problem if use that query for count some data. How to make it can count data for ex. from 2010-01 until 2010-05? after use that query the show as null. this is my query: SELECT id, Line, COUNT( Serial_number ) AS Qty, SUM(S), SUM(A), SUM(B), SUM(C), (SUM( S ) + SUM( A ) + SUM( B ) * 0....

How to create Date object from the string date in Javascript for the first years of A.D ?

Hi folks, I have next date string: "Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)" and I'm trying to convert it to the Date object: date = new Date("Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)") => Invalid Date {} and it doesn't work. And date = new Date("Thu Nov 14 2 01:01:00 GMT+0200 (GTB Standard Time)")...

Java Date Parse from one to another format

Is there a way whereby the date format can be determined in Java similar to .Net? Consider the following example: private String reformatDateString(String dateParam){ if(dateParam == null || dateParam.isEmpty()){ return null; } try{ SimpleDateFormat inDateFormat = new SimpleDateFormat("yyyy-MM-dd"); ...

How can I convert of the unix date output across multiple time zones to UTC, in Perl?

In Perl, how would one efficiently parse the output of unix's date command, taking into account time zone, and also convert to UTC? I've read many similar questions on stackoverflow, but few seem to take into account parsing multiple time zones. Instead they seem to set the timezone manually and assume it to stay fixed. # Example Inpu...

add day to current date

add a day to date, so I can store tomorrow's date in a variable. $tomorrow = date("Y-m-d")+86400; I forgot. ...

PHP get days between start-date and end-date

Hello! If I have two variables $startDate="YYYYmmdd" and $endDate="YYYYmmdd", how can I get the number of days between them please? Thank you. ...

How to format dates based on locale ?

In a template I display the day and month of a specific date : <div class="jour"><?php echo date('d',strtotime($content->getCreatedAt())) ?></div> <div class="mois"><?php echo date('M',strtotime($content->getCreatedAt())) ?></div> This works fine, problem is the month name is in English. Where do I specify that I want the month names ...

In Ruby on Rails, what's the difference between DateTime, Timestamp, Time and Date?

In my experience, getting dates/times right when programming is always fraught with danger and difficulity. Ruby and Rails have always eluded me on this one, if only due to the overwhelming number of options; I never have any idea which I should pick. When I'm using Rails and looking at ActiveRecord datatypes I can find the following ...

PHP - Calculate time between dates

Hello, would like to learn how I can calculate the time between two dates. I am working on an Unlock user functionality and the following is what I have: // get offender's username from session $username = $_SESSION['UserName']; require_once('./connections/mysql.php'); $checklockoutexpiration = mysqli_query($conn,"SELECT IsLocked...

Convert UTC to days, hours minutes etc in C

I have a a long which has the time in UTC format as a timestamp for some data, now I want to convert it to this format: month 1-12 Day 1-31 24 Hour format 0-23 minute 0-59 second 0-59 subsecond nanoseconds 0-999,999,999 now the nanoseconds can obviously be set to 0 as it doesnt need to be that accurate. What is the best method to do t...

php var to year and month

$date ='20101015'; how to convert to $year = 2010,$month = 10, $day =15 thanks ...

update/clear fields automatically or by event etc. by specific date

hi im new to programming i have this small system for room reservations (school requirement). i have this question that is it possible to update the fields of my table on specific date? for example is today is 2010-10-14. if the field matches on the same date. it will clear/update my field automatically? i dont really know where to sta...

Date time format

i want to set a variable to a particular date like this in php..how to write this function in php? jsmyStartDate = new Date('April 1, '+curYear+' 1:59:59'); ...

SQL Server 2005: how to subtract 6 month

I have a date, suppose today date declare @d datetime set @d = '20101014' I need select @d - <six month> where is the real number of days that contains last six month, beginning from @d. ...

Determine month -3 and +3 in JavaScript

Hey, Easy question, my brain is empty today.. I have a array with month(1-12) and a given month. var cMonate = new Array("Januar", "Februar", "M&auml;rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); My given month: var Month = currentMonth.getMonth(); Mont...

design wise why doesnt 0:00 return 2 digits?

Here is an example. I expected 1900/01/02 but got 1900/1/2 instead. If "1" was an int it would work. Why DOESNT this return 2 digits? i understand its a string but isnt the point of :00 to specify the digits? Why is it being ignored? var date = string.Format("{0:0000}/{1:00}/{2:00}", "1900", "1", "2"); ...