System Function that will give you current Saturday Date
Posted in 2003
Topics: Versions, Editions & End-of-Life
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
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
"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