1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

contructing a date:time

Discussion in 'T&T - Functions' started by Roedy, Sep 19, 2010.

  1. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    94
    Likes Received:
    2
    What is the simplest way to construct an expression to represent today at 1:15 PM that you could use to classify files and before and after that instant in time?
     
    #1
  2. K_Meinhard

    Joined:
    May 20, 2008
    Messages:
    228
    Likes Received:
    0
    set ct=%@makeage[%_date,13:15]

    and compare that to fileage?

    Best Regards,

    * Klaus Meinhard *
    <www.4dos.info>
     
    #2
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,531
    Likes Received:
    4
    | What is the simplest way to construct an expression to represent
    | today at 1:15 PM that you could use to classify files and before and
    | after that instant in time?

    Most, if not all, file selection commands and functions accept date and
    time ranges. As described in HELP topic "dateranges.htm", the date range
    syntax below selects files created at or after 1:15 PM local time today:
    /[d0@1:15p]
    The syntax below selects files created before that epoch:
    /![d0@1:15p]
    Fully described in HELP!
    --
    HTH, Steve
     
    #3
  4. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    94
    Likes Received:
    2
    Thanks. How about a way of telling if now is after 1PM today?
     
    #4
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,531
    Likes Received:
    4
    | Thanks. How about a way of telling if now is after 1PM today?

    If you mean to test whether or not the current time of day is after 1:00 PM
    (a test independent of anything in the file system), do this:

    if %@time[%_time] GT %@time[1:00 PM] echo It is already past 1 PM!
    --
    HTH, Steve
     
    #5
  6. K_Meinhard

    Joined:
    May 20, 2008
    Messages:
    228
    Likes Received:
    0
    Something strange here: why did I reveive my message to the forum, sent and received here originally 20-09-2010, again today (dated 26-09-2010), with Rex Conn's signature ?


    -----Ursprüngliche Nachricht-----


     
    #6
  7. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,531
    Likes Received:
    4
    K_Meinhard wrote:

    | Something strange here: why did I reveive my message to the forum,
    | sent and received here originally 20-09-2010, again today (dated
    | 26-09-2010), with Rex Conn's signature ?

    Same here. Nothing similar in any other forum. BTW, Klaus, when you use
    an all-numeric date, esp. for the first twelve days of a month, it ought to
    be ISO style for easy mental parsing anywhere, JP fora have contributors on
    all continents with varying local date formats.
    --
    Steve
     
    #7

Share This Page