Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Comparing Current date with an 8-numeric digits field with Query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Comparing Current date with an 8-numeric digits field with Query

    Try this... then just compare TODAY to WORKDATE.
    Code

  • #2
    Comparing Current date with an 8-numeric digits field with Query

    Thanks for your reply This helps if we do an equate-comparison. However i liked to set the systemdate in the form CCYYmmdd. Is this possible with query400 ?

    Comment


    • #3
      Comparing Current date with an 8-numeric digits field with Query

      I'm confused. You originally said you wanted to compare dates, now you're saying that you don't want to do an "equate-comparison". What are you really trying to do? And do you want the CCYYMMDD in character or decimal format? You can play around with DIGITS, SUBSTR, MICROSECONDS. Chris

      Comment


      • #4
        Comparing Current date with an 8-numeric digits field with Query

        This is ugly, but it may be what you are looking for ...
        Code

        Comment


        • #5
          Comparing Current date with an 8-numeric digits field with Query

          Thanks for your replies. I'm sorry but my first question is indeed confusing. What i want to do is building a query400. In the selection criteria i want to compare a 8-digit date of a database (ccyymmdd) with the systemdate. The comparison should be EQUAL or GREATER THAN the systemdate. So i'm looking for something like: DataBaseDate GE systemdate Example: DateBaseDate = 20050630 It seems to me that Zaed's reply is what i need. I'll try it next Monday. Thanks... and sorry for confusing you.

          Comment


          • #6
            Comparing Current date with an 8-numeric digits field with Query

            Hello, Can someone help me to compare in Query400 a databasefield of 8 digits (century-Year-Month-Day) with the systemdate (Current Date) ? Which calculations / instructions have i to specify? Any help is greatly appreciated.

            Comment


            • #7
              Comparing Current date with an 8-numeric digits field with Query

              Create fields as follows: SearchDate substr(digdate(MMDDYYYY),5,4) || '-' || substr(digdate(MMDDYYYY),1,2) || '-' || substr(digdate(MMDDYYYY),3,2) CurrentDat char(current(date),ISO) OldestDate char(date(current(date) - 7 days),ISO) NewestDate char(date(current(date) - 1 days),ISO) Under the select records you can now do statements like SearchDate RANGE OldestDate NewestDate SearchDate RANGE '2004-02-01' '2004-02-31' There are more tricks for this as well.

              Comment

              Working...
              X