Re: Time Issue


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Greg on April 07, 2008 at 18:38:31:

In Reply to: Re: Time Issue posted by Jim Guerber on April 07, 2008 at 09:50:03:

VB sample....

Print "Now:"; Tab(30); Now !!! returns the full date and time (with 4 digit year)
Print "Using DateValue:"; Tab(30); DateValue(Now) !!! returns the full date
Print "Using TimeValue:"; Tab(30); TimeValue(Now) !!! returns the full time (4:04:43 pm)
Print "Using Weekday:"; Tab(30); Weekday(Now) !!! returns the number 4 (if in April)
Print "Using WeekdayName:"; Tab(30); WeekdayName(Weekday(Now)) !!! returns the number 7 (if today was Saturday)
Print "Using WeekdayName (abbrev.):"; Tab(30); WeekdayName(Weekday(Now), True) !!! returns the string (Saturday)
Print "Using Month:"; Tab(30); Month(Now) !!! returns the number 4 (if in April)
Print "Using MonthName:"; Tab(30); MonthName(Month(Now)) !!! returns the string April (if in April)
Print "Using MonthName (abbrev.):"; Tab(30); MonthName(Month(Now), True) !!! returns the string Apr (if in April)
Print "Using Day:"; Tab(30); Day(Now) !!! returns the number 23 (if it is the 23rd day of the month)
Print "Using Year:"; Tab(30); Year(Now) !!! returns the number 2008 (if in 2008)
Print "Using Hour:"; Tab(30); Hour(Now) !!! returns the number 16 (if during 4PM)
Print "Using Minute:"; Tab(30); Minute(Now) !!! returns the number 23 (if it is the 23rd minute)
Print "Using Second:"; Tab(30); Second(Now) !!! returns the number 23 (if it is the 23rd second)

All these don't require a re-read of the computer clock, it just does it! I don't believe in magic but this is as close as it gets.

To get the day of the week from Comet I not so simply place a hidden datetimepicker on a dialog and do a gosub cos.getsystemtime and use the cosdayofweek variable. This works great but it is a lot of code and time. It takes 12 lines of code in Comet to simply determine the name of the month and those 12 lines of code are worthless if I haven't read the comet clock lately.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]