contructing a date:time

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

  1. Roedy

    Roedy

    Messages:
    87
    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?
  2. K_Meinhard

    K_Meinhard

    Messages:
    226
    set ct=%@makeage[%_date,13:15]

    and compare that to fileage?

    Best Regards,

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

    Steve Fabian

    Messages:
    3,407
    | 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
  4. Roedy

    Roedy

    Messages:
    87
    Thanks. How about a way of telling if now is after 1PM today?
  5. Steve Fabian

    Steve Fabian

    Messages:
    3,407
    | 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
  6. K_Meinhard

    K_Meinhard

    Messages:
    226
    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-----


  7. Steve Fabian

    Steve Fabian

    Messages:
    3,407
    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

Share This Page