Advertisement

03.13.2007 at 08:59AM PDT, ID: 22446354
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Possible to make date and time ONE variable via a calculation?

Asked by bemara57 in PHP Scripting Language, JavaScript, Perl Programming Language

Tags: , , ,

I'm trying to test if I need to import a record based on it's modified date and time (if it is over an hour from the current system time). What I'm having to do is test for BOTH the modified date AND time, otherwise if I just compare the modified time with the system time, it could give me that record if it was updated last week with that same time.

What I am trying to do is put the date and time into one variable, so I can just do a difference of the modified date/time variable with the system date/time variable (one to one). Is there a calculation that exists out there to make the date and time one variable? I just don't want to have to check for date and time separately because it leads to all kinds of complications in other functions (2 criterias instead of 1).

I'm working with Perl, but if I can do this in any language I'm sure I can bring the concept anywhere. Here's an example:

Modified Date      Modified Time                                         System Date                        System Time
03/04/07             083059 (8:30 and 59 seconds)               03/13/07                             130500 (1:30 and 0 seconds)

Perhaps I can convert the date to minutes and the time to minutes and add them up, then do the same with system date and time. Then I can subtract the difference and test if the number of minutes equal to 60 (1 hour). Does this sound like a solid logic? How can I do this if it is? If anybody has any suggestions, I would greatly appreciate it.Start Free Trial
[+][-]03.13.2007 at 09:29AM PDT, ID: 18711684

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP Scripting Language, JavaScript, Perl Programming Language
Tags: date, perl, system, time
Sign Up Now!
Solution Provided By: Adam314
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03.13.2007 at 10:43AM PDT, ID: 18712348

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2007 at 11:28AM PDT, ID: 18712724

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43