SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
How to Use DateTimePart?

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
How to Use DateTimePart?
Author Message
Joe Kamenar



Joined: 02 Feb 2004
Posts: 7

Post How to Use DateTimePart? Reply with quote

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?

Thu Mar 11, 2004 12:23 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: How to Use DateTimePart? Reply with quote

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?

Thu Mar 11, 2004 1:05 pm View user's profile Send private message
Joe Kamenar



Joined: 02 Feb 2004
Posts: 7

Post Re: How to Use DateTimePart? Reply with quote

Method 1 does not work at all. When I get the message box, I get "0" as a resultm when the time was 11:00 or 1:00. Why is this failing?

: 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

Thu Mar 11, 2004 2:37 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: How to Use DateTimePart? Reply with quote

IF you are still running one of the old versions 3.x.x please upgrade. The upgrade is free.

: Method 1 does not work at all. When I get the message box, I get
: "0" as a resultm when the time was 11:00 or 1:00. Why is this
: failing?

Thu Mar 11, 2004 3:16 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.