dbTalk Databases Forums  

More Date Formatting questions

comp.databases.pick comp.databases.pick


Discuss More Date Formatting questions in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott Deardorff
 
Posts: n/a

Default More Date Formatting questions - 02-01-2007 , 07:27 PM






Appreciate all the help last time - I've got an illegal A correlative that I
need to somehow make legal. (D3 NT/Linux) Here's what I'm trying to do,
which is obviously failing miserably:

A;0(T1,5)(D4/)(G2/1):"-"0(D4/)(G0/1)):"-"0(D4/)(G1/1))

The file ID is a system(19), and I'm trying to extract the date and convert
it to YYYY-MM-DD format.

Thanks in advance!




Reply With Quote
  #2  
Old   
panzerboy@gmail.com
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 07:51 PM






..logic polish reverse understand don't who wimps for are correls A

F0;(T1,5);P;(D4Y);"-";:;_;P;(DM);(MR%2);"-";:;_;(DD);(MR%2);:;:


Reply With Quote
  #3  
Old   
frosty
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 07:56 PM



panzerboy (AT) gmail (DOT) com wrote:
Quote:
.logic polish reverse understand don't who wimps for are correls A

F0;(T1,5);P;(D4Y);"-";:;_;P;(DM);(MR%2);"-";:;_;(DD);(MR%2);:;:
POTW! =`:^>

--
frosty




Reply With Quote
  #4  
Old   
panzerboy@gmail.com
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 08:35 PM



On Feb 2, 2:56 pm, "frosty" <fros... (AT) bogus (DOT) tld> wrote:
Quote:
panzer... (AT) gmail (DOT) com wrote:
.logic polish reverse understand don't who wimps for are correls A

F0;(T1,5);P;(D4Y);"-";:;_;P;(DM);(MR%2);"-";:;_;(DD);(MR%2);:;:

POTW! =`:^

--
frosty
My acronym circuit must be faulty, what is POTW? (or is that WTOP?)

Knowing most mere mortals prefer A correls I've tried to give the A
Correl a go
Neither
A 0(T1,5)(D4Y):"-":0(T1,5)(D4/)(G1/1):"-":0(T1,5)(D4/)(G0/1)
nor
A 0(T1-5)(D4Y):"-":0(T1-5)(DM)(MR%2):"-";0(T1-5)(DD)(MR%2)
Work, they get reject as invalid A correls.
Is there a limit on the number of processing codes you can use after a
attribute number?
A 0(T1-5)(D4Y):"-":0(T1-5)(DM):"-";0(T1-5)(DD)
Works fine but only gives single digit day & month for today, Scott
wants 2 digits.

Using the LPV allowed me to finally get a A correl that would work...
001 S
002 0
003
004
005
006
007
008 T1,5]D4/]A LPV(G2/1):"-":LPV(G1/1):"-":LPV(G0/1)

Hmm..., & you wonder why I prefer F-correls.

Jeremy Thomson



Reply With Quote
  #5  
Old   
Tom Phillips
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 08:37 PM



Scott - more parens - less parameters - minor corrections:

A;(0(T1,5)(D4/)(G2/1)):"-"0(T1,5)(D4-)(G0-2))

Tom

"Scott Deardorff" <smdamd (AT) bellsouth (DOT) net> wrote

Quote:
Appreciate all the help last time - I've got an illegal A correlative that
I need to somehow make legal. (D3 NT/Linux) Here's what I'm trying to do,
which is obviously failing miserably:

A;0(T1,5)(D4/)(G2/1):"-"0(D4/)(G0/1)):"-"0(D4/)(G1/1))

The file ID is a system(19), and I'm trying to extract the date and
convert it to YYYY-MM-DD format.

Thanks in advance!






Reply With Quote
  #6  
Old   
Tom Phillips
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 08:51 PM



Scott - different subject - system() calls.
Avoid these like the plague.
system(19) on Universe returns the logon id, so if you convert - beware.
If you absolutely must use system calls, then help yourself and wrap them in
vendor specific subroutines.
Conversions are bad enough as is, without adding to your workload.
Tom

"Tom Phillips" <squash (AT) computer (DOT) org> wrote

Quote:
Scott - more parens - less parameters - minor corrections:

A;(0(T1,5)(D4/)(G2/1)):"-"0(T1,5)(D4-)(G0-2))

Tom

"Scott Deardorff" <smdamd (AT) bellsouth (DOT) net> wrote in message
news:bswwh.15642$p%6.5781 (AT) bignews7 (DOT) bellsouth.net...
Appreciate all the help last time - I've got an illegal A correlative
that I need to somehow make legal. (D3 NT/Linux) Here's what I'm trying
to do, which is obviously failing miserably:

A;0(T1,5)(D4/)(G2/1):"-"0(D4/)(G0/1)):"-"0(D4/)(G1/1))

The file ID is a system(19), and I'm trying to extract the date and
convert it to YYYY-MM-DD format.

Thanks in advance!








Reply With Quote
  #7  
Old   
Scott Ballinger
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 08:55 PM



The real question here is why insist on the date formated as yyyy-mm-
dd? D3 does not support that via the D processing code, so you have
conditioned the users of the system to expect dates in a format for
which you will be forever building basic subroutines or complicated
correlatives (as proven by this thread) that are required everywhere
you display a date. I say use the tools the system provides for free:
give them mm-dd-yyyy (actually I prefer mm-dd-yy as it is more
compact) and then the answer is (as you probably already know) as
simple as A0(t1,5)(d4-) - which will actually be valid only for the
next 234 years, after which time the drawbacks of relying on the
embedded date in system(19) become apparent.

/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006

On Feb 1, 6:37 pm, "Tom Phillips" <squ... (AT) computer (DOT) org> wrote:
Quote:
Scott - more parens - less parameters - minor corrections:

A;(0(T1,5)(D4/)(G2/1)):"-"0(T1,5)(D4-)(G0-2))

Tom


Reply With Quote
  #8  
Old   
frosty
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 08:58 PM



panzerboy (AT) gmail (DOT) com wrote:
Quote:
On Feb 2, 2:56 pm, "frosty" <fros... (AT) bogus (DOT) tld> wrote:
panzer... (AT) gmail (DOT) com wrote:
.logic polish reverse understand don't who wimps for are correls A

F0;(T1,5);P;(D4Y);"-";:;_;P;(DM);(MR%2);"-";:;_;(DD);(MR%2);:;:

POTW! =`:^

--
frosty

My acronym circuit must be faulty, what is POTW? (or is that WTOP?)
Post Of The Week!

--
frosty




Reply With Quote
  #9  
Old   
panzerboy@gmail.com
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 09:31 PM



That doesnt work for me I get
[168] illegal a-correlative.: 'A;(0(T1,5)(D4/)(G2/1)):"-"0(T1,5)(D4-)
(G0-2))'

However
A;0(T1,5]D4/]G2/1):"-":0(T1,5]D4-U]G0-2)
works and doesnt require your system to be set for US dates.

Jeremy Thomson

On Feb 2, 3:37 pm, "Tom Phillips" <squ... (AT) computer (DOT) org> wrote:
Quote:
Scott - more parens - less parameters - minor corrections:

A;(0(T1,5)(D4/)(G2/1)):"-"0(T1,5)(D4-)(G0-2))

Tom


Reply With Quote
  #10  
Old   
Mike Preece
 
Posts: n/a

Default Re: More Date Formatting questions - 02-01-2007 , 10:59 PM



On Feb 2, 3:31 am, panzer... (AT) gmail (DOT) com wrote:
Quote:
That doesnt work for me I get
[168] illegal a-correlative.: 'A;(0(T1,5)(D4/)(G2/1)):"-"0(T1,5)(D4-)
(G0-2))'

However
A;0(T1,5]D4/]G2/1):"-":0(T1,5]D4-U]G0-2)
works and doesnt require your system to be set for US dates.

Jeremy Thomson

On Feb 2, 3:37 pm, "Tom Phillips" <squ... (AT) computer (DOT) org> wrote:



Scott - more parens - less parameters - minor corrections:

A;(0(T1,5)(D4/)(G2/1)):"-"0(T1,5)(D4-)(G0-2))

Tom- Hide quoted text -

- Show quoted text -
On the subject of american dates: Why?

Is there *any* good reason for MMDDYY?

Can we get this changed please? Helpdesk?!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.