Is there a possibility where we can pass "SYSDATE" in Date From Option while creating a date parameter in Oracle BIP? - bi-publisher

I have a requirement in preparing a report where we are having a date parameter in which user should be allowed to select a date, starting from SYSDATE to all other future dates.
For instance, If we hardcode the value as '01-01-1990' for "Date From" option, it is working fine. But if we enter the value as any of the following ("SYSDATE","SYSDATE()", "{$SYSDATE()$}") then it is not working properly.
The user should not be able to select any date before the sysdate.
Screenshot

In the concurrent program configuration, set the default value of the date parameter to ‘select sysdate from dual’

Related

How can I filter my data down to a given Year or Month in a PSQL v13 Database

I get a syntax error in PSQL Control Center on an Actian 13 database when using Date_Part and I'm out of ideas on how to proceed.
There are two fields in the table I am querying 'Date' and 'CreateDate'. I get the same error when I involve either field. I have tried both 'month' and 'year' and have confirmed the field in the database is a Date field.
I have tried the following with no luck.
select date_part('month',CreateDate) from gl_trx3 where CreateDate = '2021-10-13'
I am using this specific date for example because there are records with that date saved.
The error message I get is below.
[LNA][PSQL][SQL Engine]Error in expression: date_part('month',CreateDate)
Anyone know what I am missing?
In the list of Time and Date Functions for Pervasive SQL13 the function date_part does not exist.
Using MONTH(dateexp) returns the month as an integer in the range of 1 to 12.

How to create a single date variable from separate month and year variables in SPSS

I have a data set in which the date of an event is represented by two variables: month of the event and the year of the event. I would like to turn these two variables into a single variable, preferably formatted as a date/time variable. How would the syntax for doing this in SPSS look?
NB. I don't have a variable specifying which day (1-31) of the month a date is (and the day isn't important either). I was thinking of either just using a date format that only include the month and year, or specifying that all events happened on the first of each month.
Image illustrating how the variables look:
Image illustrating how the new date variable should look
From the menu:
Transform/Date and Time Wizard/Create a Date/time variables from...
Then select your Month variable to the Month field, Year variable to Year field
Press Next
Put a name into the 'Result Variable` field (e.g.: "MonthYear")
From the "Output format" choose whichever format you want (e.g.: "mmm yyyy")
I would suggest to "Paste" the syntax, in case you need it later ;)
Press Finish and you will get a syntax looking like this (based on the above inputs):
COMPUTE MonthYear=DATE.DMY(1, Month, Year).
VARIABLE LABELS MonthYear "".
VARIABLE LEVEL MonthYear (SCALE).
FORMATS MonthYear (MOYR8).
VARIABLE WIDTH MonthYear(8).
EXECUTE.

My Time Field in my DBGrid is showing the date and time instead of time only - delphi

I have a field in my database called 'Times', it's a date/time format and its format is set to 'short time'. In my database the date does not show, nor is it being add to the database as I know. It is only the time value. My DBGrid shows the time field with the time value and the date '12/30/1899'. How do I get rid of the date in my time field.
Here is the code I used to submit to the database.
Get time value:
bookingtimes:= timeof(dttime.Time);
Submit to Database:
tblbooking.FieldByName('Times').AsDateTime:=bookingtimes;
Example of DBGrid 'Times' column output:
12/30/1899 7:02:01AM
If I understand what you mean this will work for you, just follow this steps:
This is your issue:
Double click on your table, and select Times field:
After you click on your field, go to the Object Inspector and find DisplayFormat property:
Write the format, in your case hh:mm:ss:
Now let's see the result:
That's it.

How to use date field in a JIRA JQL Query as a predicate

I'm trying to write a JQL query that will let me find issues where the status changed to a given status after the value entered in a date field.
I want to write this query:
due is not EMPTY and status changed to "MyStatus" after due
This is not valid JQL. JIRA expects a text date or period. I get the following error:
Date value 'due' for predicate 'after' is invalid. Valid formats include: 'yyyy/MM/dd HH:mm', 'yyyy-MM-dd HH:mm', 'yyyy/MM/dd', 'yyyy-MM-dd', or a period format e.g. '-5d', '4w 2d'.
I can check if the status not in ("MyStatus","Closed") and due < now(), but that only gives me the current overdue items. I'm looking to have a query that would give me all overdue items including those that have transitioned into "MyStatus" or have been closed but did so after the specified due date.
Has anyone figured out how to do this or something similar?
I think I'd start with Script Runner and a custom JQL function for that

I'm getting "Invalid month in date" trying to run this?

I'm trying to run the following db command against Informix:
delete from table1
where u_id in (select u_id
from table2
where c_id in (select c_id
from ptable
where name = 'Smith'
and dob = '29-08-1946'));
I pass this in as a string to the db.ExecuteNonQuery method in the MS Data Application block and I get the above error?
To get the date format '29-08-1946' to work, you need your DBDATE environment variable set to a value such as "DMY4-" (or "DMY4/"). These are standard variations for the UK (I used them for years; I now use "Y4MD-" exclusively, which matches both ISO 8601:2004 (Date formats) and ISO 9075 (SQL), except when debugging someone else's environment). There are other environment variables that can affect date formatting - quite a lot of them, in fact - but DBDATE takes priority over the others, so it is the big sledgehammer that fixes the problem.
One of the problems is that your notation using a plain string is not portable between US and UK (and ISO) settings of DBDATE. If you have a choice, the neutral constructor for dates is the MDY() function:
WHERE dob = MDY(8,29,1946)
This works regardless of the setting of DBDATE. You can probably use TO_DATE() too:
SELECT TO_DATE('29-08-1946', '%d-%m-%Y') FROM dual;
This generated '1946-08-29 00:00:00.00000' for me - the function generates a DATETIME YEAR TO FRACTION(5) value, but those convert reliably to DATE values in Informix.
You can also use the DATE() function or an explicit cast to DATE (either CAST('29-08-1946' AS DATE) or '29-08-1946'::DATE), but both of those are subject to the whims of the locale of the users.
Your date field is improperly formatted. Since there is no 29th month in the year 1946 that is what is causing the error.
I'd try just swapping the month and day. 08-29-1946.
The way the day and month parts of a date string are read in can depend on your computer's culture settings.
It is always safer to pass date strings to a database in the form 'dd-MMM-yyyy' (i.e. '29-aug-1946')
It's even safer to pass them as YYYY-MM-DD, the dd-MMM-yyyy in that example will fail on a server with a (for example) French locale.

Resources