Xpath current date - date

I have a webpage where a row displays name, relation and date. I want to search for the matching row as per my values. Using Xpath, I have built the below mentioned code. The only problem is the last part (the date). I want to pick up the current date and fit it into the search query..i.e. instead of 30 Sep 2013, I want it to search for 01 Oct 2013 (assuming today is this date).
Any clue how can i do that??
$x('//tr[descendant::b[text()="text1"] and descendant::a[#class="bill" and text()="for Automation"] and descendant::td[text()="30 Sep 2013"]]')

You have to build the expression dynamically and append the date string at the end based on some date object. The specific implementation depends on which programming language you're using

Related

PowerBI Matrix with Year and Month

In the matrix below I have data from Jan 2020-Jan 2021, where the Jan column has the data from both 2021 and 2021. Is there any way to have the matrix add another column for Jan 2021 instead of aggregating that in with the Jan 2020 data?
Chose Year and Month in the date hierarchy column and then in the matrix click "expand all down one level in the hierarchy.
I am new to Power BI and I was wondering recently myself about something similar.
You can create a new column (text format) and combine month and year.
Date
Date Modified
dd-MM-yyyy
yyyy-MM
or
Date
Date Modified
dd-MM-yyyy
yyyy-MM (MMMM)
or
Date
Date Modified
dd-MM-yyyy
yyyy-MM (MMM)
It is not the most elegant solution, it changes a bit what is displayed (not simply months in the headers), it has a few disadvantages but it works.
I would be curious myself whether a better solution exists.
If you click on the date column you are using [InvoiceDate] and select the date option, it will separate out the two date values.
currently it is in a hierarchy showing just the month values but not the actual date
i have this but mine stays summed up at the year level even though the 'month' is expanded under the TimeByDay...
If I take out the year it will provide it like above but combines both... or as is it puts columns in the year

PowerBI: How to display/filter row tables between 2 years dynamically

I was wondering if there's a way where I can filter out my table results based on two years. My table A has date column and many miscellaneous columns. So currently I would like the table A to display January 2018 (or 1/1/2018) and December 2019 (or 12/31/2019 --basically ongoing) information. However, once January 1st, 2020 appears, I would like my table A to display row results between January 2019 and December 2020. Is there a way I can do so? Maybe in DAX or clicking some filter option? Could someone show me? I'm still fairly new to PowerBI.
Thanks
The easiest way to meet this requirement is usually using the Relative Date Slicer or Filter functionality:
https://learn.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Not sure if any of those options will meet your scenario. Maybe Last 12 Months (Calendar)? Your requirements description didnt make much sense to me - you probably need to explain "ongoing" and "appears".
If the Relative Date functions dont meet your needs, then you'll need to construct a column (in Power Query or DAX) that returns a static value you can use in a Slicer or Filter.

how to configure datefield xtype in dialog to just show list of years for selection instead of m/d/Y in aem

how to configure datefield xtype in dialog to just show list of years for selection instead of m/d/Y in aem.
I tried to configure it using the format property, and was able to just get the year when i select any date from datefield.
Is there a way to just show the years.
The calendar xtype does not expose any method or property to suppress the display of month and day. This is because the control returns a full date which must contain a day, month and year value.
Assuming your business logic dictates some upper or lower bound for year, i.e. 2017 means 1 Jan 2017 or 31 Dec 2017, then you are better off using a drop down list for year selection and saving the value in correct data type in accordance to your business requirement.

VB Script for date extraction and formatting

I work on OCR. We extract text from invoices automatically. When the contents of the invoice are extracted they are stored in a text file, and then we write scripts to extract the data from the text file according to our requirements.
One requirement that has got me stuck is, I need to extract the date from a text file which is not written in any particular format. Its written as 12 08 2014 in a line. I need to extract this and print it out in the dd/mm/yyyy format.
Also, the dates can be written in any format, for example 2nd December 2013, 12-12-2013, 12 Aug 2013 and so on. I need to read the date and extract it in the form of dd/mm/yyyy.
A little heads up for the problem.
There is no fixed location for the date. There are about 14000 invoices, most have a separate location of the date and separate format. I get the images and the scanned text file of the invoices, and i have to locate the date and try to format it.
The date is not after any fixed keyword that i could use. Like i mentioned in the first point, it can be after the word invoice number, or cost or any other work. SO the idea of searching it using keywords does not work as well.
This is the most stupid one, suppose I get the date 1/2/2011, how do I know whats the day and whats the month? The client has just entered a date, i have no way of finding out whats the day and the month. Is it even possible to find this out?
ORDERED SHIPPED
01239751 28 08 14 03 09 14 E31192-00 1
CUST.NO. ItN1 R 0 R NO SALE MM
NOM CI WATT VOTRF NO nr CAMMANOF in-W.01M
ADDRESS HERE
Te1:(123)123-1234/ Fax:(123)795-1234
Facture / Invoice
OUTPS:R-103958989 CONE:MONS Taws> NET 60 DAYS
SOLD TO / VENDU A SHIPPED TO / EXPEDIE A
You've already asked this.
You don't know and there is no way to know. We normally base it on the locale of the computer how dates are read. Yanks do m/d/y while the rest of the world do d/m/y. In the US windows functions assume the first and in the rest of the world the second.
As to years. Two digits are interpreted according to control panel settings. 29 and below is 2000 to 2029. 30 and above is 1930 - 1999.
Computers can not read the minds of people who write dates.

Date and timezone using j2me

I have a date string as input from an rss like:
Wed, 23 Dec 2009 13:30:14 GMT
I want to fetch only the time-part, but it should be correct according to the my timezone. Ie, in Sweden the output should be:
14:30:14
What is the best way? I want it to work with other RSS date formats as well if possible. Im using regexp right now but that is not very general.
Im having a hard time finding any library or support for dates and timezones in j2me?
/Br Johannes
In normal Java, I'd use a SimpleDateFormat object (that you create to match the pattern of the date you're getting in the RSS) to parse the String value and give you a Date object. Then, using a Calendar (which would be localized to your time zone), you'd be able to get the hour, minute, and second information.
I don't know j2me, but a google search suggests that these classes are available in j2me.