Home > Archive > Clarion > June 2006 > Date incrementing code
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Date incrementing code
|
|
| Roger Dilling 2006-05-23, 6:55 pm |
| I have a C5 order entry app which I am trying to have the order entry
date advance one day if the order is entered after noon on the
computer. I have tried a variety of different code embeds with out
success. I have gcal installed globally in the app. Here is one
example of what I have used
If Loc:Time > 1200
Ord:OrdDate = gsBUSINESSPLUS(Loc:OperDate,1,1)
Else
ORD:OrdDate = Loc:OperDate
End ! If
Ord:OrdDate is the order date I am trying to increment when the order
is entered after noon.
Loc:OperDate is defined as the computer date
Loc:Time is defined as the Computer clock time
I have captured the computer time based on a 24 hour clock. I have
tried fomating 1200 as time, I have tried using Today() in place of
Loc:OperDate, I have tried reversing the process and saying if
Loc:Time is < 1200 do the opposite thing. I always get the same
result, the code increments the order date by one day no matter what
time it is. When I display the the 1200 as a varible on the screen it
shows 0000 if not formated as a time and blank if Format(1200,t2)
Anyone have any suggestions?
Thanks for the help
Roger
| |
| lalatian@club-internet.fr 2006-06-05, 6:55 pm |
| Could you try this : ?
If Loc:Time > deformat('12:00',@t7)
Ord:OrdDate = Loc:OperDate + 1
Else
ORD:OrdDate = Loc:OperDate
End ! If
Lal
Roger Dilling wrote:
> I have a C5 order entry app which I am trying to have the order entry
> date advance one day if the order is entered after noon on the
> computer. I have tried a variety of different code embeds with out
> success. I have gcal installed globally in the app. Here is one
> example of what I have used
> If Loc:Time > 1200
> Ord:OrdDate = gsBUSINESSPLUS(Loc:OperDate,1,1)
> Else
> ORD:OrdDate = Loc:OperDate
> End ! If
>
> Ord:OrdDate is the order date I am trying to increment when the order
> is entered after noon.
> Loc:OperDate is defined as the computer date
> Loc:Time is defined as the Computer clock time
> I have captured the computer time based on a 24 hour clock. I have
> tried fomating 1200 as time, I have tried using Today() in place of
> Loc:OperDate, I have tried reversing the process and saying if
> Loc:Time is < 1200 do the opposite thing. I always get the same
> result, the code increments the order date by one day no matter what
> time it is. When I display the the 1200 as a varible on the screen it
> shows 0000 if not formated as a time and blank if Format(1200,t2)
> Anyone have any suggestions?
> Thanks for the help
> Roger
|
|
|
|
|