Search Results

Search found 8042 results on 322 pages for 'days'.

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

  • Can't download the .mp3 file from an URL after a few days

    - by user252606
    Hello, I want to download a .mp3 file on a Website with NSSURLConnection on IPhone, This .mp3 URL of the file is: http://dl.mp3.kapsule.info/fsfsdfdsfdserwrwq3/fc90613208cc3f16ae6d6ba05d21880c/4b5244f0/b/7e/b7e80afa18d06fdd3dd9f9fa44b51fc0.mp3?filename=Every-Day-I-Love-You.mp3 When I built my app, it run OK. My app downloaded the .mp3 file successful and then played it. However, after a few days, I run my app again, the app can't downloaded the .mp3 file. How can I download the .mp3 file all the time? Thank you very much.

    Read the article

  • iPhone SDK - Number of days between day and today

    - by Hankweb
    I need help on how to find out how many days it has been (seven day weeks, MSTimezone) since May 6th, 2009 [NSDate *m62009 = [NSDate dateWithTimeIntervalSinceReferenceDate:231638400]; [m62009 setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"MST"]; (to help you - 231638400 seconds from 1/1/2001)

    Read the article

  • Does march have 32 days?

    - by santhan
    Once I found march showing 32 days in JCalendar. The critical part here is this condition seems to be transient. I couldn't reproduce this in a consistent fashion. Has anyone seen this before?? Any fixes possible?? Many thanks in advance!

    Read the article

  • SQL: count days in date range?

    - by John Isaacks
    I have a query like this: SELECT COUNT(*) AS amount FROM daily_individual_tracking WHERE sales = 'YES' AND daily_individual_tracking_date BETWEEN '2010-01-01' AND '2010-03-31' I am selected from a date range. Is there a way to also get the total days in the date range?

    Read the article

  • WP7 Return the last 7 days of data from an xml web service

    - by cvandal
    Hello, I'm trying to return the last 7 days of data from an xml web service but with no luck. Could someone please explain me to how I would accomplish this? The XML is as follows: <node> <api> <usagelist> <usage day="2011-01-01"> <traffic name="total" unit="bytes">23579797</traffic> </usage> <usage day="2011-01-02"> <traffic name="total" unit="bytes">23579797</traffic> </usage> <usage day="2011-01-03"> <traffic name="total" unit="bytes">23579797</traffic> </usage> <usage day="2011-01-04"> <traffic name="total" unit="bytes">23579797</traffic> </usage> </usagelist> </api> </node> EDIT The data I want to retrieve will be used to populate a line graph. Specificly I require the day attribute value and the traffic element value for the past 7 days. At the moment, I have the code below in place, howevewr it's only showing the first day 7 times and traffic for the first day 7 times. XDocument xDocument = XDocument.Parse(e.Result); var values = from query in xDocument.Descendants("usagelist") select new History { day = query.Element("usage").Attribute("day").Value, traffic = query.Element("usage").Element("traffic").Value }; foreach (History history in values) { ObservableCollection<LineGraphItem> Data = new ObservableCollection<LineGraphItem>() { new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, }; lineGraph1.DataSource = Data; }

    Read the article

  • Detect months with 31 days

    - by daddycardona
    Is there an analogous form of the following code: if(month == 4,6,9,11) { do something; } Or must it be: if(month == 4 || month == 6 etc...) { do something; } I am trying to write an if statement that checks if this month has more than 31 days.

    Read the article

  • datepicker new date offset of 2 days

    - by HenkD
    Hi, im using datepicker v2. And I have a question. Is there a possibility to let the currentdate have a offset of 2 days. For example; today is it 14may. Can i let the datepicker start today with 16may? And that 14&15 aren't selectable? Greetz from Belgium

    Read the article

  • finding if an anniversary is coming up in n days in MySql

    - by user151841
    I have a table with anniversary dates. I want a query that returns me rows of anniversaries coming up in the next 10 days. For instance: birthdate --------- 1965-10-10 1982-05-25 SELECT birthdate FROM Anniversaries WHERE mystical_magical_mumbo_jumbo <= 10 +------------+ | birthdate | +------------+ | 1982-05-25 | +------------+ 1 row in set (0.01 sec) I'd like to keep the query in the form x <= 10, because I'll use that number 10 in other parts of the query, and if I set it to a variable, I can change it once everywhere by changing the variable, and not have to re-write the query.

    Read the article

  • Time Tracking on an Agile Team

    - by Stephen.Walther
    What’s the best way to handle time-tracking on an Agile team? Your gut reaction to this question might be to resist any type of time-tracking at all. After all, one of the principles of the Agile Manifesto is “Individuals and interactions over processes and tools”.  Forcing the developers on your team to track the amount of time that they devote to completing stories or tasks might seem like useless bureaucratic red tape: an impediment to getting real work done. I completely understand this reaction. I’ve been required to use time-tracking software in the past to account for each hour of my workday. It made me feel like Fred Flintstone punching in at the quarry mine and not like a professional. Why You Really Do Need Time-Tracking There are, however, legitimate reasons to track time spent on stories even when you are a member of an Agile team.  First, if you are working with an outside client, you might need to track the number of hours spent on different stories for the purposes of billing. There might be no way to avoid time-tracking if you want to get paid. Second, the Product Owner needs to know when the work on a story has gone over the original time estimated for the story. The Product Owner is concerned with Return On Investment. If the team has gone massively overtime on a story, then the Product Owner has a legitimate reason to halt work on the story and reconsider the story’s business value. Finally, you might want to track how much time your team spends on different types of stories or tasks. For example, if your team is spending 75% of their time doing testing then you might need to bring in more testers. Or, if 10% of your team’s time is expended performing a software build at the end of each iteration then it is time to consider better ways of automating the build process. Time-Tracking in SonicAgile For these reasons, we added time-tracking as a feature to SonicAgile which is our free Agile Project Management tool. We were heavily influenced by Jeff Sutherland (one of the founders of Scrum) in the way that we implemented time-tracking (see his article http://scrum.jeffsutherland.com/2007/03/time-tracking-is-anti-scrum-what-do-you.html). In SonicAgile, time-tracking is disabled by default. If you want to use this feature then the project owner must enable time-tracking in Project Settings. You can choose to estimate using either days or hours. If you are estimating at the level of stories then it makes more sense to choose days. Otherwise, if you are estimating at the level of tasks then it makes more sense to use hours. After you enable time-tracking then you can assign three estimates to a story: Original Estimate – This is the estimate that you enter when you first create a story. You don’t change this estimate. Time Spent – This is the amount of time that you have already devoted to the story. You update the time spent on each story during your daily standup meeting. Time Left – This is the amount of time remaining to complete the story. Again, you update the time left during your daily standup meeting. So when you first create a story, you enter an original estimate that becomes the time left. During each daily standup meeting, you update the time spent and time left for each story on the Kanban. If you had perfect predicative power, then the original estimate would always be the same as the sum of the time spent and the time left. For example, if you predict that a story will take 5 days to complete then on day 3, the story should have 3 days spent and 2 days left. Unfortunately, never in the history of mankind has anyone accurately predicted the exact amount of time that it takes to complete a story. For this reason, SonicAgile does not update the time spent and time left automatically. Each day, during the daily standup, your team should update the time spent and time left for each story. For example, the following table shows the history of the time estimates for a story that was originally estimated to take 3 days but, eventually, takes 5 days to complete: Day Original Estimate Time Spent Time Left Day 1 3 days 0 days 3 days Day 2 3 days 1 day 2 days Day 3 3 days 2 days 2 days Day 4 3 days 3 days 2 days Day 5 3 days 4 days 0 days In the table above, everything goes as predicted until you reach day 3. On day 3, the team realizes that the work will require an additional two days. The situation does not improve on day 4. All of the sudden, on day 5, all of the remaining work gets done. Real work often follows this pattern. There are long periods when nothing gets done punctuated by occasional and unpredictable bursts of progress. We designed SonicAgile to make it as easy as possible to track the time spent and time left on a story. Detecting when a Story Goes Over the Original Estimate Sometimes, stories take much longer than originally estimated. There’s a surprise. For example, you discover that a new software component is incompatible with existing software components. Or, you discover that you have to go through a month-long certification process to finish a story. In those cases, the Product Owner has a legitimate reason to halt work on a story and re-evaluate the business value of the story. For example, the Product Owner discovers that a story will require weeks to implement instead of days, then the story might not be worth the expense. SonicAgile displays a warning on both the Backlog and the Kanban when the time spent on a story goes over the original estimate. An icon of a clock is displayed. Time-Tracking and Tasks Another optional feature of SonicAgile is tasks. If you enable Tasks in Project Settings then you can break stories into one or more tasks. You can perform time-tracking at the level of a story or at the level of a task. If you don’t break a story into tasks then you can enter the time left and time spent for the story. As soon as you break a story into tasks, then you can no longer enter the time left and time spent at the level of the story. Instead, the time left and time spent for a story is rolled up from its tasks. On the Kanban, you can see how the time left and time spent for each task gets rolled up into each story. The progress bar for the story is rolled up from the progress bars for each task. The original estimate is never rolled up – even when you break a story into tasks. A story’s original estimate is entered separately from the original estimates of each of the story’s tasks. Summary Not every Agile team can avoid time-tracking. You might be forced to track time to get paid, to detect when you are spending too much time on a particular story, or to track the amount of time that you are devoting to different types of tasks. We designed time-tracking in SonicAgile to require the least amount of work to track the information that you need. Time-tracking is an optional feature. If you enable time-tracking then you can track the original estimate, time left, and time spent for each story and task. You can use time-tracking with SonicAgile for free. Register at http://SonicAgile.com.

    Read the article

  • Strange intermittent SQL connection error, fixes on reboot, comes back after 3-5 days (ASP.NET)

    - by Ryan
    For some reason every 3-5 days our web app loses the ability to open a connection to the db with the following error, the strange thing is that all we have to do is reboot the container (it is a VPS) and it is restored to normal functionality. Then a few days later or so it happens again. Has anyone ever had such a problem? I have noticed a lot of ANONYMOUS LOGONs in the security log in the middle of the night from our AD server which is strange, and also some from an IP in Amsterdam. I am not sure how to tell what exactly they mean or if it is related or not. Server Error in '/ntsb' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Source Error: Line 11: Line 12: Line 13: dbConnection.Open() Line 14: Line 15: Source File: C:\Inetpub\wwwroot\includes\connection.ascx Line: 13 Stack Trace: [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +248 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +475 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +260 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +2445449 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +2445144 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +354 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +703 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +54 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +2414696 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +92 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1657 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +84 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +1645687 System.Data.SqlClient.SqlConnection.Open() +258 ASP.includes_connection_ascx.getConnection() in C:\Inetpub\wwwroot\includes\connection.ascx:13 ASP.default_aspx.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Default.aspx:16 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42 System.Web.UI.Control.OnLoad(EventArgs e) +132 System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428 Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

    Read the article

  • Interview question: Develop an application that can display trail period expires after 30 days witho

    - by Algorist
    Hi, I saw this question in a forum about how an application can be developed that can keep track of the installation date and show trail period expired after 30 days of usage. The only constraint is not to use the external storage of any kind. Question: How to achieve this? Thanks Bala --Edit I think its easy to figure out the place to insert a question work. Anyway, I will write the question clearly. "external storage" means don't use any kind of storage like file, registry, network or anything. You only have your program.

    Read the article

  • Querying a Cassandra column family for rows that have not been updated in X days

    - by knorv
    I'm moving an existing MySQL based application over to Cassandra. So far finding the equivalent Cassandra data model has been quite easy, but I've stumbled on the following problem for which I'd appreciate some input: Consider a MySQL table holding millions of entities: CREATE TABLE entities ( id INT AUTO_INCREMENT NOT NULL, entity_information VARCHAR(...), entity_last_updated DATETIME, PRIMARY KEY (id), KEY (entity_last_updated) ); The table is regularly queried for entities that need to be updated: SELECT id FROM entities WHERE entity_last_updated IS NULL OR entity_last_updated < DATE_ADD(NOW(), INTERVAL -7*24 HOUR) ORDER BY entity_last_updated ASC; The entities returned by this queries are then updated using the following query: UPDATE entities SET entity_information = ?, entity_last_updated = NOW() WHERE id = ?; What would be the corresponding Cassandra data model that would allow me to store the given information and effectively query the entities table for entities that need to be updated (that is: entities that have not been updated in the last seven days)?

    Read the article

  • Delete backup files older than 7 days

    - by rockbala
    Using osql command, SSQL backup of a database is created. It is saved to Disk. Then renamed to match the date of the day backup was taken. All these files are saved in a single folder all the time. for example: Batch1.bat does the following 1) Created backup.bak 2) renamed to backup 12-13-2009.bak (this is done by the combination of % ~ - etc to get the date parameter) This is now automated to take backup everyday by Task scheduler in Windows. Can the batch file also be modified to delete backup files older than 7 days? if so, how ? If it is not possible via batch file, other than manually deleting the files are there any other alternatives to automate the deleting job ? Thanks in advance, Balaji S

    Read the article

  • Oracle SQL Update query takes days to update

    - by B Senthil Kumar
    I am trying to update a record in the target table based on the record coming in from source. For instance, if the incoming record is present in the target table I would update them in the target else I would simply insert. I have over one million records in my source while my target has 46 million records. The target table is partitioned based on calendar key. I implement this whole logic using Informatica. I find that the Informatica code is perfectly fine looking at the Informatica session log but its in the update it takes long time (more than 5 days to update one million records). Any suggestions as to what can be done on the scenario to improve the performance?

    Read the article

  • Adding days to NSDate

    - by karthick
    I want add days to a date, I got many codes for this but none of them are working for me below shown is my code,please somebody help me to fix this issue int daysToAdd=[[appDlegateObj.selectedSkuData objectForKey:@"Release Time"] intValue]; NSTimeInterval secondsForFollowOn=daysToAdd*24*60*60; NSString *dateStr=[contentDic objectForKey:@"Date"]; NSDateFormatter *dateFormatter=[[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"yyyy-MM-dd"]; NSDate *dateFromString=[[NSDate alloc]init]; dateFromString=[dateFormatter dateFromString:dateStr]; [dateFormatter release]; NSDate *date=[dateFromString dateByAddingTimeInterval:secondsForFollowOn];

    Read the article

  • bat script to delete file older than 7 days

    - by Jessie
    hi guys i have a bat script in which gets all files in a folder and then converts this folder with its contents into a one RAR file. This script also adds the current date once it makes a copy and moves it this file into a backup folder, i am planning to have this bat file run by a windows scheduler task every day. My question is there a way to add into this cript to also delete all rar files older than 7 days in the backup folder? for /f "delims==" %%D in ('DIR D:\scripts /A /B /S') do ( "C:\Program Files\WinRAR\WinRAR.EXE" a -agyyyy-MM-dd -r "c:\backup\scripts.rar" "%%D" )

    Read the article

  • Curl download image only if not older than 2 days

    - by mark
    I want to download a image from a remote server only if it is not older than 2 days. I have the constructing as below now. Is this right? I want to now the last_modified data first before downloading. $ch = curl_init($file_source); // the file we are downloading curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_FILE, $wh); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_FILETIME, true); curl_exec($ch); $headers = curl_getinfo($ch); $last_modified = $headers['filetime']; if ($last_modified != -1) { // unknown echo date("Y-m-d", $last_modified); //etc } curl_close($ch); fclose($wh);

    Read the article

  • SQL finding overlapping of times pass midnight (across 2 days)

    - by janechii
    Hi everyone, I know there are lots of these types of questions, but i didn't see one that was similar enough to my criteria. So i'd like to ask for your help please. The fields i have are just start and end which are of time types. I cannot involve any specific dates in this. If the time ranges don't go pass midnight across day, i'd just compare two tuples as such: end1 > start2 AND start1 < end2 (end points touching are not considered overlapped here.) But when I involve time range that pass (or at) midnight, this obviously doesn't work. For example, given: start | end --------+-------- 06:00PM | 01:00AM 03:00PM | 09:00PM Without involving dates, how can i achieve this, please. My assumption is, if end is less than start, then we're involving 2 days. I'm trying to do this in plain standard SQL, so just a simple and concise logic in the WHERE clause. Thank you everyone!

    Read the article

  • r -- finding difference between business days

    - by acesnap
    I have several years of data (only for business days (no weekends or holidays)) in an [r] data frame and would like to find the difference between the data on the 2nd and 5th business day of each month. So the solution needs to go thru the list, determine the 2nd and 5th business day, get the data for the corresponding dates and then find the difference. the data looks like: 1/19/1990 1.22 1/20/1990 1.25 1/23/1990 1.26 (Gap in date is weekend) ... 2/1/1990 1.34 2/2/1990 1.36 2/5/1990 1.22 (Gap in date is weekend) I have tried using dateTime() but it doesn't handicap for weekends and holidays. Any suggestions would be appreciated, thanks.

    Read the article

  • jQuery UI Datepicker - Disable specific days

    - by Sam
    Is there any (easy) way to set the jQuery UI Datepicker to disallow selection of specific, predetermined days? I was able to get this approach working, however, it produces a null error which prevents it from displaying in IE. 'natDays[...].0' is null or not an object Thanks in advance! UPDATE: Might help if I included some code, right? Anyway, most of this was taken straight from the aforementioned thread: natDays = [ [7, 23], [7, 24], [8, 13], [8, 14], ]; function nationalDays(date) { for (i = 0; i < natDays.length; i++) { if (date.getMonth() == natDays[i][0] - 1 && date.getDate() == natDays[i][1]) { return [false, natDays[i][2] + '_day']; } } return [true, '']; } function noWeekendsOrHolidays(date) { var noWeekend = $.datepicker.noWeekends(date); if (noWeekend[0]) { return nationalDays(date); } else { return noWeekend; } } $(function() { $("#datepicker").datepicker({ inline: true, minDate: new Date(2009, 6, 6), maxDate: new Date(2009, 7, 14), numberOfMonths: 2, hideIfNoPrevNext: true, beforeShowDay: $.datepicker.noWeekends, altField: '#alternate', }); }); Thanks again!

    Read the article

  • Jquery UI Datepicker disabling wrong days

    - by Nazariy
    I have run in to issue that days that have to be disabled are shifted to the next day. The idea is that day that does not exist in our booking object or have a value less than 1 should be disabled on calendar. here is simplified version of my script and demonstration on jsfiddle: var bookings = { "2012-09-01": 24, "2012-09-03": 31, "2012-09-05": 27, "2012-09-06": 9, "2012-09-07": 18, "2012-09-08": 0, "2012-09-10": 20, "2012-09-12": 19, "2012-09-13": 0, "2012-09-14": 9, "2012-09-15": 24, "2012-09-17": 19, "2012-09-19": 28, "2012-09-20": 15, "2012-09-21": 12, "2012-09-22": 25, "2012-09-24": 19, "2012-09-26": 0, "2012-09-27": 0, "2012-09-28": 0, "2012-09-29": 0 }; function MyEvent(date) { bookings = bookings || {}; this.date = date.toISOString().substr(0, 10); this.display = (typeof bookings[this.date] == 'number' && bookings[this.date] > 0); return this; } MyEvent.prototype.toArray = function () { return [this.display, null, null]; }; $(function () { $('#eventCalendar').datepicker({ dateFormat: "yy-mm-dd", firstDay: 1, defaultDate: "2012-09-24", beforeShowDay: function (date) { return new MyEvent(date).toArray(); } } ); }); Can some one suggest me what am I doing wrong or is it a bug?

    Read the article

  • how to convert minutes to days,hours,minutes

    - by tuxou
    hi how to convert minutes into days hours and minutes in java public String timeConvert(int time){ String t = ""; int h = 00; int m = 00; // h= (int) (time / 60); // m = (int) (time % 60); // if(h>=24) h=00; if((time>=0) && (time<=24*60)){ h= (int) (time / 60); m = (int) (time % 60); }else if((time>24*60) && (time<=24*60*2)){ h= (int) (time / (1440)); m = (int) (time % (1440)); }else if((time>24*60*2) && (time<=24*60*3)){ h= (int) (time / (2880)); m = (int) (time % (2880)); }else if((time>24*60*3) && (time<=24*60*4)){ h= (int) (time / (2880*2)); m = (int) (time % (2880*2)); }else if((time>24*60*4) && (time<=24*60*5)){ h= (int) (time / (2880*3)); m = (int) (time % (2880*3)); }else if((time>24*60*5) && (time<=24*60*6)){ h= (int) (time / (2880*4)); m = (int) (time % (2880*4)); }else if((time>24*60*6) && (time<=24*60*7)){ h= (int) (time / (2880*5)); m = (int) (time % (2880*5)); } t =h+":"+m ; return t; } I tried this but it dont work thanks

    Read the article

  • Problem finding the difference in days between two dates

    - by James
    I have been using a tidy little routine that I found here to calculate the difference in days between two dates in AS3. I am getting some strange results and I am wondering if any of you inter-codal-mega-lords can shed some light? Why is Q1 of 2010 coming up one day short, when in all other cases the routine is performing fine? Many thanks in advance to anyone who can help! function countDays( startDate:Date, endDate:Date ):int { var oneDay:int = 24*60*60*1000; // hours*minutes*seconds*milliseconds var diffDays:int = Math.abs((startDate.getTime() - endDate.getTime())/(oneDay)); return diffDays; } countDays( new Date( 2010, 00, 01 ), new Date( 2011, 00, 01 ) ); // returns 365, which is correct countDays( new Date( 2010, 00, 01 ), new Date( 2010, 03, 01 ) ); // returns 89, which is 1 day short countDays( new Date( 2010, 03, 01 ), new Date( 2010, 06, 01 ) ); // returns 91, which is correct countDays( new Date( 2010, 06, 01 ), new Date( 2010, 09, 01 ) ); // returns 92, which is correct countDays( new Date( 2010, 09, 01 ), new Date( 2011, 00, 01 ) ); // returns 92, which is correct

    Read the article

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