date

How to find the latest row for each group of data

Hi All, I have a tricky problem that I'm trying to find the most effective method to solve. Here's a simplified version of my View structure. Table: Audits AuditID | PublicationID | AuditEndDate | AuditStartDate 1 | 3 | 13/05/2010 | 01/01/2010 2 | 1 | 31/12/2009 | 01/10/2009 3 | 3 ...

JavaScript date comparisons

I am new to the lower level useful functions of JavaScript, and I find myself needing to compare two date objects, but within an hourly range. For example, if Date1 is less then two hours until (or from) Date2. How could this be done? ...

Is there a way to check if a variable is a Date in JavaScript?

I was wondering if there is any way to check if an object is specifically a Date in JavaScript. isType returns object for Date, which isn't enough for this scenario. Any ideas? Thanks! ...

Changing date format to "%d/%m/%Y"

Hi Guys, Would like to change the date format in R. My data frame is shown below and would like to change all the date formats to "%d/%m/%Y" .Any help would be appreciated! df: id bdate wdate ddate 1 09/09/09 12/10/09 2009-09-27 Thanks, Bazon ...

PHP - How can I check if the current date/time is past a set date/time ?

I'm trying to write a script that will check if the current date/time is past the 05/15/2010 at 4PM How can I use PHP's date() function to perform this check? I can't think of a neat way to do it >.< ...

Sharepoint: Display the current date

Is it possible to display the current date in the master.default page? I am running MOSS 3.0. ...

Using an objects date (without time) for a table header instead of an objects date and time (iphone)?

I've been working on an iphone project and have run into an issue. Currently In the table view where it displays all the objects, I use headers based on the objects datePerformed field. The only problem is that my code apparently creates a header that contains both the date and time resulting in objects not being grouped solely by thei...

PHP all word date

I want to express the date in PHP as "May Fourteenth Two-thousand and ten", any ideas? Extra but not necessary would be the time like "Eight forty-eight PM"? ...

How do I replace absolute times ("1:30 PM") with relative times ("15 minutes ago") and have them automatically update?

Is there a Javascript script to change the time and date of blogs automaticly like facebook ??? for example "10 minutes ago" instead of "May 15 2010 12:30". -Thank You ...

How to create a batch file to delete folders that lie between user specified created date of the folder.

Hi , I need a batch file which deletes all the folders that were created between a specific date.The dates should be user input. That is created date from and till provided by user input. Thanks Nis ...

Idea of developing "Calendar" from scratch

What's the broad math idea behind the calendar if you need to build one from scratch without depending on OS or other libraries ? ...

Ruby comparing dates

I would like to do is to know if a user has been created in the system in the last 10 second. so i would do: def new_user if(DateTime.now - User.created_at < 10) return true else return false end end IT is just an idea , how can i do it correctly? thank you ...

Javascript setFullYear

var currentDate=new Date(); currentDate.setFullYear(2011); alert(currentDate); This works, it sets the year to 2011 as expected. alert((new Date()).setFullYear(2011)); This one doesn't work. Any idea why? Am I misunderstanding the syntax? ...

MySQL to fill in missing dates when using GROUP BY DATE(table.timestamp) without joining on temporary table

Hello, after reading through a couple similar Qs/As I haven't quite found the solution I'm looking for. The table data I have is GROUP BY DATE(timestamp) and returning a count, example result: [timestamp] => 2010-05-12 20:18:36 [count] => 10 [timestamp] => 2010-05-14 10:10:10 [count] => 8 Without using a temporary table, or calendar ...

How to lookup data based on the next sunday of the week

I need to lookup a row of data from MySQL based on the next Sunday of the week. Anyone know how? ...

what is the most elegant way of showing first week in a month

In C#, i want to show the first week in a calendar (in a html table) and i am trying to figure out the most elegant algorithm to generate the right days. If the first day of the week is not Sunday, i want to show the days of preceding month (like you would see on a regular calendar). So, as an input you have a current month. In this c...

how can I select data from MySQL based on date (unix time record)

I have a record of data with unix time date in it i want to select the row based on the date/month/year only (not with time) currently Im using something like this select * from tablename where date > '$today' and date < '$tomorow' LIMIT 1; how ever this is not that accurate if the $today and $tomorrow have different tim...

How to set the time for a specific local in javascript

Hi, i have a problem, and maybe someone can help me, i will explain... i have the in javascript "var date= new date();" and its give me the local time (browser time) but i want force this data/time for a especific local... for example... Spain. i want everytime that someone enter in the page (from others country) the date need be the ...

Vbscript - Object Required for DateLastModified

I don't really know what's wrong right here. I'm trying to create a vbscript that basically checks two Folders for their files and compare the DateLastModified attribute of each and then copies the source files to the destination folder if the DateLastModified of the source file is newer than the existing one. I have this code: Dim s...

Java: JPQL date function to add a time period to another date

SELECT x FROM SomeClass WHERE x.dateAtt BETWEEN CURRENT_DATE AND (CURRENT_DATE + 1 MONTH) In the above JPQL statement, SomeClass has a memebr dateAttr, which is a java.util.Date and has a @Temporal(javax.persistence.TemporalType.DATE) annotation. I need a way to do the (CURRENT_DATE + 1 MONTH) bit - it is obviously wrong in its curren...