Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
After date()
Message
From
22/11/2016 01:53:32
 
 
To
18/11/2016 20:42:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01643685
Message ID:
01643805
Views:
91
Ahhh - that works a lot better. thanks naoto.

k

>Sorry about the goof on the second example -- there was a typo -- it had periods instead of commas
>
if date() > date(2016,12,15) then
>    * some code
>endif
>
>Note: You could also extend on the examples given and use datetime values -- using datetime constants of format {^YYYY.MM.DD hh:mm:ss} or call to DATETIME(YYYY,MM,DD,hh,mm,ss) function.
>
>>the first of your examples works fine for me. the second one not so much - but happy to get it going. thanks for help naoto, date formats even in fields have always created issues for me.
>>
>>k
>>
>>>>what is the simplest way to express
>>>>if date() after December 15 2016
>>>>do this
>>>>endif
>>>>
>>>>tnx
>>>>Karen
>>>
>>>You could compare against a date constant of the format {^yyyy.mm.dd} (note the use of the caret symbol -- specifies yyyy.mm.dd format rather than format that would vary by locale or by SET DATE configuration.)
>>>
>>>
if date() > {^2016.12.15} then
>>>    * some code
>>>endif
>>>
>>>alternatively you could use call the DATE function with the year, month and day value --- DATE(yyyy,mm,dd)
>>>
>>>
if date() > date(2016.12.15) then
>>>    * some code
>>>endif
Previous
Reply
Map
View

Click here to load this message in the networking platform