Ticket #4 (closed enhancement: wontfix)

Opened 14 years ago

Last modified 14 years ago

inverse operation of "calc t make_time" to get time string in numeric format

Reported by: wegler Owned by:
Priority: lowest Milestone: Ongoing improvement of command line version
Component: SH Severity:
Keywords: Cc:

Description (last modified by MarcusWalther) (diff)

inverse operation of "calc t make_time". If a time string is entered the calc command returns the time string in numeric format. For example:

calc i &d = 10-Aug-2008:10:10:24.4 get_day
echo "d
10
calc i &m = 10-Aug-2008:10:10:24.4 get_month
echo "m
8

Change History

comment:1 Changed 14 years ago by MarcusWalther

  • Priority changed from major to trivial
  • Description modified (diff)

comment:2 Changed 14 years ago by MarcusWalther

  • Status changed from new to closed
  • Resolution set to wontfix

If you just want to get information about day, month, year, ... you could use the EXTRACT subfunction of CALC. To make this reliable, the time string must have a fixed format (e.g. length of year is four, and so on):

sdef foo 1-feb-99_1:2:3.01
sdef bar
calc t &bar = "foo tadd 0
sdef month
calc s &month = "bar extract 4 3

comment:3 Changed 14 years ago by MarcusWalther

  • Milestone set to Ongoing improvement of SH
Note: See TracTickets for help on using tickets.