sandyrepope
15-08-2007, 00:38
Here is a script showing how to use some of the dt module functions.
uses "ui"
uses "dt"
dim s as string 'holds the current date
dim week_day_name as string
dim day as long
dim day_string as string
dim month as string
dim year as long
s = date$ 'get the current date
week_day_name = dt_getweekdayname(dt_getweekday(S), %dt_use_long_form)
month = dt_getmonthname(s, %dt_use_long_form)
day = dt_day(s)
day_string = day
select case day_string
case "1","21","31"
day_string += "st"
case "2","22"
day_string += "nd"
case "3","23"
day_string += "rd"
case else
day_string += "th"
end select
year = dt_year(s)
msgbox 0, "Today is" _
+ $crlf _
+ week_day_name _
+ $crlf _
+ month + " " _
+ day_string + " " _
+ year
Thanks
Sandy
uses "ui"
uses "dt"
dim s as string 'holds the current date
dim week_day_name as string
dim day as long
dim day_string as string
dim month as string
dim year as long
s = date$ 'get the current date
week_day_name = dt_getweekdayname(dt_getweekday(S), %dt_use_long_form)
month = dt_getmonthname(s, %dt_use_long_form)
day = dt_day(s)
day_string = day
select case day_string
case "1","21","31"
day_string += "st"
case "2","22"
day_string += "nd"
case "3","23"
day_string += "rd"
case else
day_string += "th"
end select
year = dt_year(s)
msgbox 0, "Today is" _
+ $crlf _
+ week_day_name _
+ $crlf _
+ month + " " _
+ day_string + " " _
+ year
Thanks
Sandy