From aashishrl at yahoo.co.in Fri Jul 2 13:08:10 2010 From: aashishrl at yahoo.co.in (Aashish L) Date: Fri, 2 Jul 2010 18:38:10 +0530 (IST) Subject: [Bese-devel] Date in form and clsql time elements mapping Message-ID: <530059.26336.qm@web8405.mail.in.yahoo.com> Hi I am using stock UCW and I have difficulty in handling dates from CLSQL. Take a look at following code, its messy, use of variables- dd,mm,yy and action- datehelper is what I want to avoid! I also refered back Boxset's form.lisp, but could not figure out how to put raw d,m,y intgers back in time element. Help welcome! Thanks. ~Arl code starts:------------- (clsql:def-view-class datetrial () ((id :db-kind :key :type (integer 4) :initarg :id :initform 0) (trydate :accessor trydate :type clsql:wall-time :initarg :trydate :initform (clsql:make-time :year 2000 :month 1 :day 1))) (:base-table |datetrial|)) ;(clsql:create-view-from-class 'datetrial) (defcomponent date-man () ((ddate :accessor ddate :initarg :ddate :backtrack t :initform (make-instance 'datetrial)))) (defcomponent get-date (date-man) ()) (defmethod render ((self get-date)) (let* ((temp (ddate self)) (bdate (trydate temp)) (dd (clsql:time-element bdate :day-of-month)) (mm (clsql:time-element bdate :month)) (yy (clsql:time-element bdate :year))) (= x 2020)) (