Method 1: Dim time_now, time Dim hour, number Now time_now DateTimePart time_now, "hh", hour MessageBox hour Method 2: MessageBox "@T"h"" or alternatively using a variable Dim hour, number, @T"h" MessageBox hour : I have this bit of code that does not work right. I am trying to isolate the : hour in the time value: Today(curr_date) : DateTimePart curr_date, "hh", hour : messagebox hour : I have also tried using: Now(time_now) : But when I look at the value for the 'hour', I get 0. : The 'hour' variable is dimmed as a number. : Any suggestions?
|