0

I am new to jbase and stuck in one query. I want to extract last 14 days data using jbase. I have written the following query :

Select filename WITH DATE > '14-MAY-2013'

I hardcoded '14-MAY-2013', becouse I dont know how to get currentdate i used CURRENTDATE also but hard luck .

Vivek Bernard
  • 2,063
  • 3
  • 26
  • 43
bikash
  • 1
  • 1
  • 4

4 Answers4

1

Try the following Select command

SELECT filename WITH DATE GE 20130514. 

To get the current date you can use the global jbase variable TODAY.

SELECT filename WITH DATE GE TODAY.

lennon310
  • 12,503
  • 11
  • 43
  • 61
Osama Adil
  • 11
  • 2
1

You can use EVAL to write a program inside your SELECT or LIST statement. In your case it depends on what format the DATE field is stored in the jBase.

For example you could write something like this:

SELECT filename WITH DATE GE EVAL "OCONV(DATE()-14, 'D-YMD')"

The "DATE()-14" will return current date as number of days since December 31, 1967 minus 14 days, OCONV(x, 'D-YMD') will format the x to a date separated by '-' dashes.

PrecisionLex
  • 801
  • 11
  • 26
0

Try WITH DATE GE TODAY. If that does not work, try and give more information about your issue and what you are trying to achieve.

0

To get the current date you can use the global jbase variable TODAY.

SELECT filename WITH DATE EQ TODAY.

EQ works as a equal sign.

alinboby
  • 1
  • 3