| 发表于:2007-03-08 11:50:598楼 得分:5 |
public class form1 private sub form1_load(byval sender as system.object, byval e as system.eventargs) handles mybase.load msgbox(chkdate(now, "14:30 ").tostring( "yyyy-mm-dd ")) end sub public function chkdate(byval nowdate as date, byval timechkpoint as string) as date dim itimespan as timespan itimespan = nowdate.subtract(date.parse(timechkpoint)) if itimespan.totalseconds < 0 then return (nowdate.adddays(-1)) else return nowdate end if end function end class | | |
|