Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #6045 > unrolled thread
| Started by | Rob Smith <rasmithhalifax@gmail.com> |
|---|---|
| First post | 2013-10-09 04:39 -0700 |
| Last post | 2013-10-10 07:12 -0700 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Basic Rob Smith <rasmithhalifax@gmail.com> - 2013-10-09 04:39 -0700
Re: Basic dlzc <dlzc1@cox.net> - 2013-10-09 07:10 -0700
Re: Basic JohnMartens <martens@tennishulp.info> - 2013-10-09 18:16 +0200
Re: Basic dlzc <dlzc1@cox.net> - 2013-10-10 07:12 -0700
| From | Rob Smith <rasmithhalifax@gmail.com> |
|---|---|
| Date | 2013-10-09 04:39 -0700 |
| Subject | Basic |
| Message-ID | <b3b447ee-0ae9-4ff2-aaa9-f1515a72ce34@googlegroups.com> |
Hi Can someone tell me how Cstart = CLng(#2/24/1906#)translates into VO please. Thanks Robert
[toc] | [next] | [standalone]
| From | dlzc <dlzc1@cox.net> |
|---|---|
| Date | 2013-10-09 07:10 -0700 |
| Message-ID | <03392ded-76cf-4a1c-b9c7-a39cf7d6ee36@googlegroups.com> |
| In reply to | #6045 |
Dear Rob Smith:
On Wednesday, October 9, 2013 4:39:10 AM UTC-7, Rob Smith wrote:
>
> Can someone tell me how Cstart = CLng(#2/24/1906#)
> translates into VO please.
This is a Clipper translation, sorry...
#2/24/1906# => CTOD("2/24/1906")... assuming the date is in system date order.
... since dates are already integers, then
Cstart := CTOD("2/24/1906")
By the way, you can subtract two dates, to get the days between dates also...
David A. Smith
[toc] | [prev] | [next] | [standalone]
| From | JohnMartens <martens@tennishulp.info> |
|---|---|
| Date | 2013-10-09 18:16 +0200 |
| Message-ID | <l33vg9$6n7$1@dont-email.me> |
| In reply to | #6047 |
To avoid problems with your date setting (eg is 04/01/2013 4th of Jan of
1st of Apr) you can use
ConDate(<dwYear>, <dwMonth>, <dwDay>) ---> dDate
John
dlzc schreef op 9-10-2013 16:10:
> Dear Rob Smith:
>
> On Wednesday, October 9, 2013 4:39:10 AM UTC-7, Rob Smith wrote:
>>
>> Can someone tell me how Cstart = CLng(#2/24/1906#)
>> translates into VO please.
>
> This is a Clipper translation, sorry...
>
> #2/24/1906# => CTOD("2/24/1906")... assuming the date is in system date order.
>
> ... since dates are already integers, then
> Cstart := CTOD("2/24/1906")
>
> By the way, you can subtract two dates, to get the days between dates also...
>
> David A. Smith
>
[toc] | [prev] | [next] | [standalone]
| From | dlzc <dlzc1@cox.net> |
|---|---|
| Date | 2013-10-10 07:12 -0700 |
| Message-ID | <fd7ff7ff-af7f-4ddb-98a6-e63707bedb16@googlegroups.com> |
| In reply to | #6047 |
On Wednesday, October 9, 2013 7:10:57 AM UTC-7, dlzc wrote:
> Dear Rob Smith:
>
>
>
> On Wednesday, October 9, 2013 4:39:10 AM UTC-7, Rob Smith wrote:
>
> >
>
> > Can someone tell me how Cstart = CLng(#2/24/1906#)
>
> > translates into VO please.
>
>
>
> This is a Clipper translation, sorry...
>
>
>
> #2/24/1906# => CTOD("2/24/1906")... assuming the date is in system date order.
>
>
>
> ... since dates are already integers, then
>
> Cstart := CTOD("2/24/1906")
Clipper and variant languages have differentiated the equal sign, since the language is / was loosely typed.
"=" could be either "make the left variable equal to the right expression", or return a logical .T. (or true) if the left expression is equal to the right expression. And it will permit (in some variants of the Clipper language) that "same" = "sameExcept", but NOT "sameExcept" = "same". And you trust the compiler to determine from context which you intend.
":=" means only "make the left variable equal to the right expression"
"==" means the two expressions must be identical
JohnMartens is right to suggest using explicit date conversions that are not muddied by date format settings, placing day before month, and/or year before all.
David A. Smith
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web