I am using a MySQL database to store information on machines on the network. I have one table that contains the core information, determining whether to probe the machines for more information. The main piece of data I would like to use is a timestamp. And be able to then do date comparisions. If the timestamp greater than a given date.

What I want to know is that if I take the value from the MySQL timestamp I should be able to treat it like an integer. It is stored in a format that as time moves in the future the appeared value is always greater.

This seems like the most efficient way to process this data. But having little experience with timestamps and knowing the experience out there. Can anyone suggest a better approach.

Sorry about the lack of code I am designing it now and just wonder what is the best way to dig into it. My searches on it seem to give varied resulsts and most are concerned with converting the timestamp for display. Thank you in advance.

UpdateKey is a bad choice of words. Key as in key to the probelm.

The first paragraph has been redone it was:
I am using a MySQL database to store information on machines on the network. I have one table that contains the key information determining whether to probe the machines for more information. The key I would like to use is a timestamp. And be able to then to date comparisons. Has this machine been scanned since date foo set in the program.


In reply to MySQL Timestamp comparison by Ninthwave

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.