Menu

Getting the system date as a NUMBER

Help
Anonymous
2012-03-13
2012-11-23
  • Anonymous

    Anonymous - 2012-03-13

    Hi everybody,

    I want to know if there's any method to get the system date and convert it as a Number, or just getting the system date's year as a number.

    Thanks!!

     
  • vranoch

    vranoch - 2012-03-17

    I implemented this through user defined functions - I found some suitable date-manipulation library and exposed selected functions to the CLIPS language.

    Vranoch

     
  • Anonymous

    Anonymous - 2012-03-20

    And could you write it in this forum?? cause i'm going to lose my mind thinking about it!! :S

    Thanksss

     
  • Gary Riley

    Gary Riley - 2012-04-13

    If you're running on unix, you can do the following:

    CLIPS> 
    (deffunction get-date ()
       (system "date > date.out")
       (open "date.out" date "r")
       (bind ?v (readline date))
       (close date)
       (explode$ ?v))
    CLIPS> (get-date)
    (Fri Apr 13 10:56:13 CDT 2012)
    CLIPS>
    
     

Log in to post a comment.