Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
A poster on IDS 9.4 asked for a system function returning the current Saturday date. Art S. Kagel said none exists but pointed to his datelib_ak package in the IIUG repository, which parses relative dates like this saturday. Ravi Krishna suggested writing a function, and Sauron suggested the WEEKDAY function. No confirmation of a final solution.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Hi All,
Is there a system function in Informix that will
give you a current specific date of a week (specifically
current Saturday).
IDS 9.4
Dynix/Ptx 4.5.3
Thank you ALL
↪ replying to N
Art S. Kagel — — source: Usenet: comp.databases.informix
On Tue, 23 Dec 2003 16:05:01 -0500, N wrote:
No, but, I posted a package, datelib_ak, to the IIUG Repository that includes a
yacc/bison file, getdate.y, which translates into a library function (getdate)
that parses text containing date and time information, and outputs an struct
timeval, (an updated version that handles dates which are not convertable into
UNIX epoch and outputs an extended struct tm structure is in the works) along
with a library of functions to convert that structure to Informix Date or
DateTime types. In addition to parsing standard date/time formats both
versions of the function understand fuzzy and relative dates like: "this
saturday" or "last saturday" and "three weeks after saturday"!
Here's some output from the program compiled with it's test main enabled:
kagel> datetest
Enter date, or blank line to exit.
> this saturday
gdt_format(1): Sat Dec 27 17:15:00.000000 EST 2003 gdt_format(0): Sat Dec 27
22:15:00.000000 UTC 2003 Julian date: 2003.361. asctime: Sat Dec 27 22:15:00
2003 UTC
> last saturday
gdt_format(1): Sat Dec 20 17:15:07.000000 EST 2003 gdt_format(0): Sat Dec 20
22:15:07.000000 UTC 2003 Julian date: 2003.354. asctime: Sat Dec 20 22:15:07
2003 UTC
>
>
Art S. Kagel
> Hi All,
> Is there a system function in Informix that will
> give you a current specific date of a week (specifically current Saturday).
>
> IDS 9.4
> Dynix/Ptx 4.5.3
>
> Thank you ALL
↪ replying to N
Ravi Krishna — — source: Usenet: comp.databases.informix
"N" <N@N.COM> wrote in message news:162Gb.1989$SO5.986@newssvr29.news.prodigy.com...
> Hi All,
> Is there a system function in Informix that will
> give you a current specific date of a week (specifically
> current Saturday).
>
> IDS 9.4
> Dynix/Ptx 4.5.3
No, but you can easily write a function to achieve this and then it can
be used as any standard function.
Hi!
> Is there a system function in Informix that will
> give you a current specific date of a week (specifically
> current Saturday).
You can to use the function WEEKDAY (IBM Informix Guide to SQL).
--
Sauron
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.