Search Results

Search found 16509 results on 661 pages for 'date range'.

Page 9/661 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Javascript Date Range Validation

    Here is a Javascript function that will tell you if 2 dates make a valid date range. function isValidDateRange( objstartMonth,objstartDay, objstartYear, objendMonth,objendDay, objendYear) { var startDate = new Date(objstartYear.options[objstartYear.selectedIndex].value, objstartMonth.options[objstartMonth.selectedIndex].value, objstartDay.options[objstartDay.selectedIndex].value); var endDate = new Date(objendYear.options[objendYear.selectedIndex].value, objendMonth.options[objendMonth.selectedIndex].value, objendDay.options[objendDay.selectedIndex].value); if (startDate >= endDate){ alert("Invaild Date Range"); return false; } else{ return true; } }

    Read the article

  • java.util.Date.toString() is printing out wrong format

    - by pacoverflow
    The following code prints out "vmtDataOrig.creationdate=2012-11-03" VmtData vmtDataOrig = VmtDataDao.getInstance().loadVmt(1); System.out.println("vmtDataOrig.creationdate=" + vmtDataOrig.getCreationDate().toString()); Here is the definition of the creationDate field in the VmtData class: private Date creationDate = null; Here is the hibernate mapping of the creationDate field to the database table column: <property name="creationDate" column="CREATIONDATE" type="date"/> The CREATIONDATE column in the MySQL database table is of type "date", and for the record retrieved it has the value "2012-11-03". The Javadoc for the java.util.Date.toString() method says it is supposed to print the Date object in the form "dow mon dd hh:mm:ss zzz yyyy". Anyone know why it is printing it out in the form "yyyy-MM-dd"?

    Read the article

  • Calculating a delta of years from a date

    - by Spiros
    I am trying to figure out a way to calculate the year of birth for records when given the age to two decimals at a given date - in Perl. To illustrate this example consider these two records: date, age at date 25 Nov 2005, 74.23 21 Jan 2007, 75.38 What I want to do is get the year of birth based on those records - it should be, in theory, consistent. The problem is that when I try to derive it by calculating the difference between the year in the date field minus the age, I run into rounding errors making the results look wrong while they are in fact correct. I have tried using some "clever" combination of int() or sprintf() to round things up but to not avail. I have looked at Date::Calc but cant see something I can use. p.s. As many dates are pre-1970, I cannot not unfortunately use UNIX epoch for this.

    Read the article

  • Perl: calculating a delta of years from a date

    - by Spiros
    Hello, I am trying to figure out a way to calculate the year of birth for records when given the age to two decimals at a given date - in Perl. To illustrate this example consider these two records: date, age at date 25 Nov 2005, 74.23 21 Jan 2007, 75.38 What I want to do is get the year of birth based on those records - it should be, in theory, consistent. The problem is that when I try to derive it by calculating the difference between the year in the date field minus the age, I run into rounding errors making the results look wrong while they are in fact correct. I have tried using some "clever" combination of int() or sprintf() to round things up but to not avail. I have looked at Date::Calc but cant see something I can use. p.s. As many dates are pre-1970, I cannot not unfortunately use UNIX epoch for this.

    Read the article

  • Convert date from access to SQL Server with SSIS

    - by Arne
    Hi, I want to convert a database from access to SQL Server using SSIS. I cannot convert the date/time columns of the access db. SSIS says something like: conversion between DT_Date and DT_DBTIMESTAMP is not supported. (Its translated from my German version, might be different in English version). In Access I have Date/Time column, in SQL Server I have datetime. In the dataflow chart of the SSIS I have a OLE DB source for the access db, an sql server target and a data conversion. In the data conversion I convert the columns to date[DT_DATE]. They are connected like this: AccessDB -> conversion -> SQL DB What am I doing wrong? How can I convert the Access date columns to SQL Server date columns?

    Read the article

  • Significance of date 02/31/2157?

    - by dpatchery
    I work in a large scale IT support environment. Twice now we have seen an invalid date of 02/31/2157 being inserted in an Oracle DATE column. So far I have not been able to reproduce this problem, but it appears to be happening occasionally when a user attempts to save '00/00/0000' into the column. I believe the value is originating from a PowerBuilder DataWindow update. The application uses myriad libraries for all sorts of technologies, so this question may be a bit vague, but... Has anyone seen the date 02/31/2157 in some established library that Oracle could be defaulting to when some other invalid date is entered? Perhaps an end-of-time concept analogous to the beginning-of-time date of 1/1/1970?

    Read the article

  • How to convert "9:00 PM EST" to a Date object

    - by Bara
    I am developing an Android application and require some basic datetime manipulation. I have a Date object (from Java.util.Date) holding a specific date. I need to add a specific time to it. The time I have is a string in this format: "9:00 PM EST" How would I "add" this time to the previous date? If the Date object currently has: "4/24/10 00:00:00" How would I change it to instead be: "4/24/10 09:00:00 EST" I would prefer to do this without the use of an external library, if possible.

    Read the article

  • How do I get the current date according to an NTP server without setting it locally?

    - by Zac B
    I want to get the current date and time according to a remote NTP server, using Linux. I don't want to change the local time as a result; I just want to get the remote date, adjusted for the local time zone, printed out. The date returned must comply with the following criteria: It needs to be reasonably accurate. It needs to be adjusted for the timezone on the local system making the request. It needs to be formatted in an easily-readable or interpretable way (standard date format, or seconds since epoch). What I've Tried: I can call ntpdate -q my.ntp.server and get the offset between the local time and the server's time, but that doesn't return the date according to the NTP server; it just returns the offset and the local date. Is there some easy way/command I can use to say: "Print out the date according to a given NTP server, adjusted for my current timezone"?

    Read the article

  • Compare two date whit jquery

    - by Mercer
    Hello, i have two String fields who represent Date in my page and i would to compare this two fields to know if my first date < second date <tr> <td align="right">First Date: </td> <td align="left"> <html:text name="addPublicationForm" styleId="firstDate" property="firstDate" maxlength="10"/></td> </tr> <tr> <td align="right">Second Date: </td> <td align="left"> <html:text name="addPublicationForm" styleId="secondDate" property="secondDate" maxlength="10"/></td>

    Read the article

  • Search for files after a relative date using Windows search

    - by Zoredache
    I am looking for a way to save a search that includes a relative date. Specifically I am looking for a way to save a search that matches files that have a modification date that is 7 days ago. I have read the Windows Search Advanced Query Syntax document and I am not seeing a way to say 7 days ago. The numbers and ranges section does mention that relative dates are possible. The problem is that the relative dates described there do not fit the criteria I need. The lastweek almost looks like what I want except if I run a query like after:lastweek on a Monday it will only show my file that have been modified since Sunday at 12:00. The lastweek/lastmonth seem to relative to the start of the week/month which is not what I need. Multi-word relative dates: week, next month, last week, past month, or coming year. The values can also be entered contracted, as follows: thisweek, nextmonth, lastweek, pastmonth, comingyear. One nice thing about saved searches is that they are stored as an XML document and the file format is documented. I am not seeing how to form a correct value for a datetime. If I was able to understand this format, I suspect I could use a text editor and created a saved search that does what I want. Fragment from the examples: <conditions> <condition type="leafCondition" valuetype="System.StructuredQueryType.DateTime" property="System.DateModified" operator="imp" value="R00UUUUUUUUZZXD-30NU" propertyType="wstr" /> </conditions> To summarize I am looking for an answer to one or both of these questions How do I make a query for '7 days ago' using the standard syntax? How is the DateTime stored in a saved search?

    Read the article

  • php and XML range into array

    - by Mike
    The code below helps be to get the WHOLE XML and put it into an array. What I'm wondering is, what would be a good way to get the XML only from item 3 - 6 or any arbitrary range instead of the whole document. $mt_arr = array(); $d = new DOMDocument(); $d->load('http://news.google.com/?output=rss'); foreach ($d->getElementsByTagName('item') as $t) { $list = array ( 'title' => $t->getElementsByTagName('title')->item(0)->nodeValue); array_push($mt_arr, $list); } Thanks

    Read the article

  • Evenly distribute range of specified values within a vector

    - by nofunsally
    I have a vector A and I want to populate it with values as evenly as possible. For example, if A is 1x30 and I want to use three values I would use a code like this below: % A = zeros(1,30); A([1:10])=0; A([11:20])=1; A([21:30])=2; This works, but seems a bit cumbersome to me. Is there a more elegant way to evenly (as possible) distribute a specified range of values within a vector? I am intent on keeping each of the values in "clumps." Thank you kindly in advance.

    Read the article

  • Date query with Hibernate on Timestamp Column in PostgreSQL

    - by Shashikant Kore
    A table has timestamp column. A sample value in that could be 2010-03-30 13:42:42. With Hibernate, I am doing a range query Restrictions.between("column-name", fromDate, toDate). The Hibernate mapping for this column is as follows. <property name="orderTimestamp" column="order_timestamp" type="java.util.Date" /> Let's say, I want to find out all the records that have the date 30th March 2010 and 31st March 2010. A range query on this field is done as follows. Date fromDate = new SimpleDateFormat("yyyy-MM-dd").parse("2010-03-30"); Date toDate = new SimpleDateFormat("yyyy-MM-dd").parse("2008-03-31"); Expression.between("orderTimestamp", fromDate, toDate); This doesn't work. The query is converted to respective timestamps as "2010-03-30 00:00:00" and "2010-03-31 00:00:00". So, all the records for the 31st March 2010 are ignored. A simple solution to this problem could be to have the end date as "2010-03-31 23:59:59." But, I would like to know if there is way to match only the date part of the timestamp column. Also, is Expression.between() inclusive of both limits? Documentation doesn't throw any light on this.

    Read the article

  • How to set a static system date for one user or application--"Groundhog Day"

    - by aixylinux
    I have a vendor application on AIX which requires the system date to be set to an arbitrary value for QA testing purposes. The application gets its date from the system, and there is no possibility of changing it to get the date from a parameter. The application runs under a specific userid. I'd like to find a way to set the date for this application or user to a private value without affecting all the other users and applications on the system. So far the only thing I have been able to do is dedicate an LPAR to this application. Every day at midnight a root crontab job resets the date to the static value. This works, but it is wasteful of resources; and now I am faced the requirement to do this for other applications, which, of course, require different dates. Is there any clever solution to this? I need a way to create a sandboxed environment where the date returned from the system can be set to a private value. As I said, the OS is AIX, and that can't be changed for this application either.

    Read the article

  • Warning: date() expects parameter 2 to be long, string given in

    - by Simon
    its the $birthDay = date("d", $alder); $birthYear = date("Y", $alder); i dont know what it is here is my code //Dag $maxDays = 31; $birthDay = date("d", $alder); echo '<select name="day">'; echo '<option value="">Dag</option>'; for($i=1; $i<=$maxDays; $i++) { echo '<option '; if($birthDay == $i){ echo 'selected="selected"'; } echo ' value="'.$i.'">'.$i.'</option>'; } echo '</select>'; //Måned echo '<select name="month">'; $birthMonth = date("m", $alder); $aManeder = 12; echo '<option value="">Måned</option>'; for($i = 1; $i <= $aManeder; $i++) { echo '<option '; if($birthMonth == $i) { echo 'selected="selected"'; } echo ' value="'.$i.'">'.$ManderArray[$i].'</option>'; } echo '</select>'; //År $startYear = date("Y"); $endYear = $startYear - 30; $birthYear = date("Y", $alder); echo '<select name="year">'; echo '<option value="">år</option>'; while($endYear <= $startYear) { echo '<option '; if($birthYear == $endYear) { echo 'selected="selected"'; } echo ' value="'.$endYear.'">'.$endYear.'</option>'; $endYear++; } echo '</select>';

    Read the article

  • AWS free tier "sign up date" vs "credit card details submission date"

    - by Mayur Rokade
    I am worried about my account expiry date. I created an account on AWS in July 2013 and submitted my credit card details on 31st Oct 2013. I went in Billing Management Console/Bills section where when I click on Date, I can see months ranging from July 2013 to Nov 2013. From AWS FAQs I gathered When does the AWS free usage tier expire? The AWS free usage tier will expire 12 months from the date you sign up. So WHEN will my account expire, July 2014 (sign up date) or Oct 2014 (credit card details submission date) ?

    Read the article

  • Group by date range on weeks/months interval

    - by khelll
    I'm using MySQL and I have the following table: | clicks | int | | day | date | I want to be able to generate reports like this, where periods are done in the last 4 weeks: | period | clicks | | 1/7 - 7/5 | 1000 | | 25/6 - 31/7 | .... | | 18/6 - 24/6 | .... | | 12/6 - 18/6 | .... | or in the last 3 months: | period | clicks | | July | .... | | June | .... | | April | .... | Any ideas how to make select queries that can generate the equivalent date range and clicks count?

    Read the article

  • Convert PHP date into javascript date format

    - by LeeTee
    I have a PHP script that outputs an array of data. This is then transformed into JSON using the json_encode() function. My issue is I have a date within my array and its is not in the correct javascript format. How can I convert this within PHP so it is? $newticket['ThreadID'] = $addticket; $newticket['Subject'] = $subject; //$newticket['DateCreated'] = date('d-m-Y G:H'); Instead of the above fo rthe date I need the equivilant of the javascript function new Date() When I output the above I get the following "Fri Jun 01 2012 11:08:48 GMT+0100 (GMT Daylight Time)" However, If I format my PHP date to be the same, javascript rejects it. Confused... Can anyone help?

    Read the article

  • Use of date function in PHP to output a user-friendly date

    - by Jamie
    I have a MySQL database column named DateAdded. I'd like to echo this as a readable date/time. Here is a simplified version of the code I currently have: $result = mysql_query(" SELECT ListItem, DateAdded FROM lists WHERE UserID = '" . $currentid . "' "); while($row = mysql_fetch_array($result)) { // Make the date look nicer $dateadded = date('d-m-Y',$row['DateAdded']); echo $row['ListItem'] . ","; echo $dateadded; echo "<br />"; } Is the use of the date function the best way to output a user-friendly date? Thanks for taking a look,

    Read the article

  • Convert Json date string to JavaScript date object

    - by dagda1
    Hi, I have the following JSON object which has a date field in the following format: { "AlertDate": "\/Date(1277334000000+0100)\/", "Progress": 1, "ReviewPeriod": 12 } I want to write a regular expression or a function to convert it to a javascript object so that it is in the form: { "AlertDate": "AlertDate":new Date(1277334000000), "Progress": 1, "ReviewPeriod": 12 } The above date format fails validation in the JQuery parseJSON method. I would like to convert the 1277334000000+0100 into the correct number of milliseconds to create the correct date when eval is called after validation. Can anyone help me out with a good approach to solving this? Cheers Paul

    Read the article

  • php add hours to date output wrong result

    - by i need help
    Basically what I want to do is to send an email to follow up on order placed in 3 hours later. What I try to do is to get the current date (up to hours level), then compare with the orderdate+ 3 hours, to see whether it match. Example orderdate: 2010-06-12 18, after add 3 hours should become 2010-06-12 21 However, after add hour, the final result sometimes become bigger, sometimes become smaller... something wrong. $now= date('Y-m-d H'); echo $now . "<br>"; ... ... while ($data = mysql_fetch_array ($result)) { $orderid = $data['orderid']; $orddate = $data['orddate']; $corddate= date('Y-m-d H:i:s', $orddate); $year = substr ($corddate, 0, 4); $month = substr ($corddate, 5, 2); $day = substr ($corddate, 8, 2); $hour = substr ($corddate, 11, 2); $actualorderdate= $year . "-" . $month . "-" . $day . " " . $hour; $new_time = mktime ($hour+3, 0, 0, $month, $day, $year); $year = date ('Y', $new_time); $month = date ('m', $new_time); $day= date ('d', $new_time); $hour= date ('h', $new_time); $xhourslater= $year . "-" . $month . "-" . $day . " " . $hour; echo "actualorderdate: ". $actualorderdate. " xhourslater: " . $xhourslater. "<br>"; if($now==$xhourslater) { echo "now is 3 hours later" . "<br>"; //send email follow up, then update status as sent, in order not to resend anytime in the 3rd hour. } }

    Read the article

  • Convert Date MMDDYY to Date for database Insert

    - by lesponce
    I got an array with a date set as 071712 . no / slash characters for the date, no dash. nothing, just plain 071712 (coming from a text file). I need to convert the date so I can include it in a SqlServer insert statement. I'm calling a stored procedure for the insert. So far I have this: // This is not working so far. DateTime date = Convert.ToDateTime(fileLines[4]); (date will be used as a parm for the stored procedure)

    Read the article

  • Is it possible to set the date on a Linux machine to the year 2040?

    - by Daryl Spitzer
    I need to be able to set the date on Ubuntu (8.04.4 LTS) to the year 2040 (to test something that isn't relevant to this question). Is that possible? I can run: $ sudo date -s "15 JAN 2038 18:00:00" Fri Jan 15 18:00:00 PST 2038 ...but: $ sudo date -s "15 JAN 2039 18:00:00" date: invalid date `15 JAN 2039 18:00:00' Is the limit somewhere in 2038 (or prior to Jan. 15, 2039)? Does this change with different versions of Linux?

    Read the article

  • Gnome 3 release date

    - by extropy
    Is there a timeline for Gnome 3 development? When do we get hands on the first beta builds? The only thing I know is that Gnome 3 is planned in place of Gnome 2.30. Last Gnome release was 2.26 in March 2009. Sticking to 6 month releases, 2.30 should arrive at March 2011. Is there some other date?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >