LDAPPartial Date match in LDAP query - ldap-query

Is it possible to prepare LDAP query in which only Day and Month are considered by matching the Date.
Eg.
If Birth date is 28/09/1989 than in LDAP query should filter all the identities whose month is 09 and Day is 28.
thanks and regards,
Mayank

I think the answer will depend on the attribute and its syntax.
If the birth date is a String, you could be matching based on substring:
(birthdate=28/09/*)
But this assumes all dates are exactly in the same string representation.
For data and time, the LDAP specifications only define a GeneralizedTime syntax and matching rule for equality.
However, there are some LDAP directory servers, such as OpenDJ, that have extended the matching rules and allow to match a GeneralizedTime with parts of it. However, not all servers support this.
Assuming birthdate is a GeneralizedTime with the following value 20010928000000Z
You can query the server like this:
(birthDate:1.3.6.1.4.1.26027.1.4.7:=09M28D)

Related

Power Automate - Compare StartDate to current date?

We are looking to compare the calendar start date with the current date in flow. Currently we are pulling the start date through a filter query like this:
formatDateTime('EventDate','M-d-yyy hh:mm')
and comparing to this:
formatDateTime(addDays(utcNow(),3),'M-d-yyyy hh:mm')
I am getting this error currently: "Unable to process template language expressions in action 'Get_items' inputs at line '1' and column '17987': 'In function 'formatDateTime', the value provided for date time string 'EventDate' was not valid. The datetime string must match ISO 8601 format."
Any help on this would be greatly appreciated!
You could Initialize a variable like the following below and then do a IF condition.
#{add(div(sub(ticks(utcNow()),ticks('1900-01-01')),864000000000),2)}
I test with the same formula to convert event start date and it works fine in my end. The if condition returns correct result on different conditions.
Here is the logic of my demo flow, please have a check:
I use get item to get the start date of a certain event in the calendar list and convert the start time dynamic content to the format I need. Almost same with yours.
According to the error message, it seems the format of the event date column is not in the supported format. Would you like to provide the settings of your event date column? I test with the default start time column and a custom date & time column of default settings. Both of them works fine with the flow above.
Update:
The two formulas used are displayed below:
formatDateTime(outputs('Get_item')?['body/Event_x0020_Date'],'M-d-yyy hh:mm')
formatDateTime(addDays(utcNow(),3),'M-d-yyyy hh:mm')
I just directly use the outputs of the data compose action in the if condition
What worked for me was to build a sequence of numbers with the dates being ordered by day, month and year this way, when converting to integer, it's easy to compare
int(formatDateTime(utcNow()),'yyyyMMdd'))
if you need add day for exemple, you can use
int(formatDateTime(addDays(utcNow(),variables('extraDays')),'yyyyMMdd'))
and the other date like this
int(formatDateTime(variables('FinalDate'),'yyyyMMdd'))
Based on your example, you can put hours and minutes without any problems, just remove the special characters and spaces
but by the definition of the error you are having, I believe it is because of the way you are writing the variable

NetSuite Saved Search formula to get a field's value as of a given date

I am required to use a saved search to answer the question: how many cancelled Sales Orders did we have on a specified date? I must use a saved search because ultimately it will be something viewed on a dashboard (and this is what the end users are used to). I know that I can and how to complete via SuiteScript; this is explicitly a question related to Saved Searches and/or SuiteAnalytics. The status of our sales orders fluctuates more than a “normal company”, i.e. 1 SO might change status 3 or 4 times before being “done”. My initial thought was to create a saved search and add “System Notes fields…” as results. So I’d have something like the following:
For the given date 7/19/20 the status was “Canceled” since 7/19/20 is greater than 6/12/20 and less than 7/22/20. I would like to get this field’s value on 7/19/20 programmatically and display it as a Saved Search results column but I don’t know how. I think I’m stuck because I don’t know how to tell NetSuite in a saved search to look at the date in the row above or below. Said differently I don’t know how to compare the given date to all the system note dates to find the system note date that is right before (use the old value) or after (use the new value) the given date. In excel I would do the following, how do i do this in a NetSuite Saved Search?
To apply a dynamic date filter:
In the Criteria tab, add a date filter:
Filter = System Notes : Date is on today
In the Available Filters tab, add the same date filter:
Filter = System Notes : Date,
Show in Filter Region = Yes

Add x Days to a Date Based on vlookup Output Excel

What I'm trying to do is give a due date based on an input date, type of review, and department.
For example if the department is ABC and the review is retrospective, the due date will be the input date + 30 days.
But if the department is ABC and the review is concurrent, then the due date will be input date + 1 day.
I know I can concatenate the department and review into the vlookup table but I'm not so sure how to get the output to be the due date that I want.
Can anyone help?
EDIT:
Per the first answer below, I hashed out an input table with concatenated columns just in case I needed them. It is a bit more complicated than I originally thought.
Input table with date logic
I'd love to simply edit the source data but the report isn't readily available in the database. Could I still use the suggestions below?
Assuming you have a lookup table for the number of days to add depending upon the department and review type similar to the one below, you can use an INDEX/MATCH/MATCH and simply add it to the input date:
=$A2+INDEX($H$4:$J$5,MATCH($B2,$G$4:$G$5,0),MATCH($C2,$H$3:$J$3,0))
SOLUTION FOR AN ALTERNATIVE LOOKUP TABLE LAYOUT
If your layout table is more like as below, you can use a MINIFS formula (or MAXIFS if you would prefer):
=$A2+MINIFS($I$3:$I$8,$G$3:$G$8,$B2,$H$3:$H$8,$C2)

how to search for latest content on google?

in google search box when we type something like " 'java code' + inurl:javalobby " we will get the search results where the website link contains the string javalobby and the page will contain the string java code.
Similarly is there a way to search the latest updated content in the internet which will contain the keyword entered in the search box ?
Thanks.
There are two tricks in google to narrow your search based on date. It is using either the keyword daterange:startdate-enddate or by content creation date.
1. Using the syntax daterange:startdate-enddate : The catch is that the date must be expressed as a Julian date, a continuous count of days since noon UTC on January 1, 4713 BC. So, for example, July 8, 2002 is Julian date 2452463.5 and May 22, 1968 is 2439998.5. Furthermore, Google isn't fond of decimals in its daterange: queries; use only integers: 2452463 or 2452464. You can convert Julian dates online here.
Example:- Geri Halliwell left the Spice Girls around May 27, 1998. If you wanted to get a lot of information about the breakup, you could try doing a date search in a ten-day window—Say, May 25 to June 4. That query would look like this:
"Geri Halliwell" "Spice Girls" daterange:2450958-2450968
2. Searching by content creation date : Try adding a string of common date formats to your query. If you wanted something from May 2003, for example, you could try appending:
("May * 2003" | "May 2003" | 05/03 | 05/*/03)
A query like that uses up most of your ten-query limit, however, so it's best to be judicious— perhaps by cycling through these formats one a time. If any one of these is giving you too many results, try restricting your search to the title tag of the page.
If you're feeling really lucky you can search for a full date, like May 9, 2003. Your decision then is if you want to search for the date in the format above or as one of many variations: 9 May 2003, 9/5/2003, 9 May 03, and so forth. Exact-date searching will severely limit your results and shouldn't be used except as a last-ditch option.
When using date-range searching, you'll have to be flexible in your thinking, more general in your search than you otherwise would be (because the date-range search will narrow your results down a lot), and persistent in your queries because different dates and date ranges will yield very different results. But you'll be rewarded with smaller result sets that are focused on very specific events and topics.

Dates month names language in Oracle?

I have a varchar field in my table which contains a date, formatted as: Dic 31 1999 12:00AM, which can generally be converted without any problems using a to_date configuring 'Mon DD YYYY HH:MIAM'.
Month names can of course come in any language. For instance, January, would be Jan in English and Ene in Spanish.
I reckon the Oracle client will pick up the machine's locale to figure which is the language of the incoming string. The only problem is that this will not always work if you are a server where you can't really know where the date is coming from.
My current problem is that every time I'm in a Spanish set computer and try to process a date with English named months, I'll get an "invalid month" error.
Is there I way I could tell Oracle, on execution time, which is the language I'm sending?
The current ugly workaround is to translate not matching months to Spanish.
You should use NLS_DATE_LANGUAGE for that:
select to_char(sysdate, 'dd Month, Day', 'NLS_DATE_LANGUAGE = turkish') from dual
You can use SELECT * FROM NLS_SESSION_PARAMETERS to determine you current language settings (also NLS_INSTANCE_PARAMETERS and NLS_DATABASE_PARAMETERS exist).
Use NLS_* environment variables on your workstation or ALTER SESSION statements within your SQL session to change these language settings.
ALTER SESSION might work. I don't remember exactly how, but I know you can set locales, date styles and number formats with it.

Resources