Filter orders by modify date

I’m trying to add a new filter that will sort orders by modification date. Below is the code I found and modified. Unfortunately, filtering doesn’t work, returns zero results.I think the problem is with $ filter_id

function get_filter_shop_order_meta( $  domain = 'woocommerce' ){     // Add below the metakey / label pairs to filter orders     return [         'last_modified' => __('Recently updated', $  domain)     ]; }   add_action( 'restrict_manage_posts', 'display_admin_shop_order_by_meta_filter' ); function display_admin_shop_order_by_meta_filter(){     global $  pagenow, $  typenow;      if( 'shop_order' === $  typenow && 'edit.php' === $  pagenow ) {         $  domain    = 'woocommerce';         $  filter_id = 'filter_shop_order_by_meta';         $  current   = isset($  _GET[$  filter_id])? $  _GET[$  filter_id] : '';          echo '<select name="'.$  filter_id.'">         <option value="">' . __('Sort by…', $  domain) . '</option>';          $  options = get_filter_shop_order_meta( $  domain );          foreach ( $  options as $  key => $  label ) {             printf( '<option value="%s"%s>%s</option>', $  key,                  $  key === $  current ? '" selected="selected"' : '', $  label );         }         echo '</select>';     } }   add_filter( 'request', 'process_admin_shop_order_marketing_by_meta', 99 ); function process_admin_shop_order_marketing_by_meta( $  vars ) {     global $  pagenow, $  typenow;          $  filter_id = 'filter_shop_order_by_meta';      if ( $  pagenow == 'edit.php' && 'shop_order' === $  typenow      && isset( $  _GET[$  filter_id] ) && ! empty($  _GET[$  filter_id]) ) {         $  vars['meta_key']   = $  _GET[$  filter_id];         $  vars['orderby']    = 'ASC';     }     return $  vars; }   add_filter( 'woocommerce_shop_order_search_fields', 'shop_order_meta_search_fields', 10, 1 ); function shop_order_meta_search_fields( $  meta_keys ){     foreach ( get_filter_shop_order_meta() as $  meta_key => $  label ) {         $  meta_keys[] = $  meta_key;     }     return $  meta_keys; } 

I will be grateful for your help.

Google Analytics 3 – Date range issue while viewing all Pages (Site Content Pages)

I am using Google Analytics 3 property, and using a custom dimension "UserName" (Scope = User). I am trying to view all pages/ page URLS a particular user has travelled in the website. I am trying to filter using the "UserName" custom Dimension in Behaviors -> Site Content -> All pages.

This particular user whom I am filtering has done some activity on some dates and in other dates no activity.

For example — Sept 1st and Sept 2nd he has visited some pages, other dates like Aug 30, Aug 31 no visits.

When I am trying to see the page view — by filtering this user in Custom Dimension – When I select the dates specifically which he has done activity data is displayed in the graph and table .

When I select random date range — which is a combination of (activity dates and no activity dates), data is not displayed in the table – shows No data but in the graph above data is shown. Attached the Image.

How to proceed with this issue ? Is this an issue for GA side ?

Image

generate future dates for multiple entries based on start and end date of each row

i have an issue figuring out the below approach, would appreciate f you can give me a hand with a SQL query to generate the required result (basically i want to generate dates that semi annually Greater than start date and less than or equal end date)

Table

ID Start Date End Date
X 1 Jan 2021 1 Jan 2023
Y 1 Mar 2021 1 Mar 2023
Z 1 Jun 2021 1 Jun 2023

results needed

ID Date
X 1 Jun 2021
X 31 Dec 2021
X 1 Jun 2022
X 1 Jan 2023
y 31 Sep 2021
y 1 Mar 2022
y 31 Sep 2022
Y 1 Mar 2023
z 1 Jan 2022
z 1 Jun 2022
z 1 Jan 2023
z 1 Jun 2023

thanks in advanced

Teradata min and max dates Find the Employees Start Date and Time and End Date and Time for each date

I have columns AssignedTo, InternalID, Task Function, Min(STARTDATE), Max(ENDDATE) AssignedTo, InternalID, Task Function STARTDATE, ENDDATE Joe 67077 Write the letter 08/24/2017 05:30 AM NULL Joe 16354 Send the letter 08/24/2017 06:30 am 08/24/2017 07:30 am Joe 16359 Mail Letter 08/24/2017 08:32 am 08/24/2017 08:35 am Joe 13340 Call to Member 08/24/2017 09:32 am 08/24/2017 10:35 am Joe 13318 Fax to Member 08/24/2017 12:01 pm 08/24/2017 12:05 am Joe 14895 Fax to Member 8/20/2017 11:28:34 PM 8/20/2017 11:28:34 PM Joe 79806 Call to Member 08/24/2017 03:30pm 08/24/2017 04:30 PM

Trying to create 1 line line this: Assigned TO: Date: Start Date End Date Joe 08/24/2017 08/24/2017 05:30 AM 08/24/2017 04:30 PM

I want the first Start Date and last End Date for each day the assigned to is in the system for that day. I’m using teradata. i’m sure this has been asked some where i just have not been able to locate it. Or I have been over thinking this.

Find Max Date from a Distinct Row Then Add Value to a Table Column

Quick disclaimer – I am familiar with Access, but a novice at MySql within Access.

I have a table with activity data that I pulled into a query to filter down to only necessary data. The query table has DateTime, Call, and Designator columns. The Call and Designators rows repeat numerous times. The Call is a numeric value which identifies a unique activity and there may be many Designators assigned to each Call. Within this query, I need to find the Max and Min DateTime values of distinct rows (based on the Call and Designator rows) and then add a "Start" value to a new column for the Min DateTime and "End" for the Max DateTime.

Once the Start and End times have been identified for each unique row (Call and Designator) I need to calculate the total time each Designator spent on each call. I assume that I may have to create another query to include DateTime, Designator, Call, Start Time, End Time, Total Time on a single row to generate reports. But, it would be much easier if it can all be done with one script on the same query.

I’ve been searching for the past several days and haven’t made any progress so I don’t have any existing work to show.

Expected Result

Thank you in advance!!

Retrieve first transaction that has no transaction before date range


heres what i composed. Is there anyway to optimized this query?

SELECT c.name, min(td.tran_date)  FROM customer c,      INNER JOIN t_details td ON c.id = t.c_id      INNER JOIN transactions t ON td.t_num = t.t_num WHERE      NOT EXISTS      (SELECT t_date        FROM transactions       WHERE t_date <= "2020-12-31"      )      t.t_date BETWEEN "2021-01-01" AND "2021-12-31" 

Union All of two tables based on month of a date in Oracle

I have two tables table_a and table_b as below. column invdate is of date datatype and column amount is of number datatype.

table_a

invdate amount
20-01-2021 50
20-01-2021 100
20-02-2021 50
20-03-2021 50

table_b

invdate amount
01-01-2021 250
01-02-2021 300
01-03-2021 40
01-03-2021 50

I am doing a UNION ALL of both tables to get the sum of the amounts based on only month and year.

SELECT to_char(invdate, 'MM-YYYY') as "Date", sum(amount) as "Total" FROM ( SELECT to_char(invdate, 'MM-YYYY'), amount FROM table_a UNION ALL SELECT to_char(invdate, 'MM-YYYY'), amount FROM table_b ) GROUP BY to_char(invdate, 'MM-YYYY') ORDER BY to_char(invdate, 'MM-YYYY') asc; 

to get the final output like below

Date Total
01-2021 400
02-2021 350
03-2021 140

but it gives me the below error.

ORA-00904: "INVDATE": invalid identifier 00904. 00000 -  "%s: invalid identifier" *Cause:     *Action: Error at Line: 10 Column: 18 

What am I doing wrong here?

the_modified_time showing wrong date

I have an wordpress self-hosted installation that is over 10 years old. I was updating the template files to show the last modified date instead of the published date for my posts.

Old snippet: <time datetime="<?php the_time('c');?>"> <?php the_time('j F Y'); ?></time>

New snippet: <time datetime="<?php the_modified_time('c');?>"><?php the_modified_time('j F Y'); ?>

Here’s where it got weird. Every post that was modified before 6 februari 2021 shows the date 6 februari 2021. Every post that got updated after 6 februari 2021 shows the correct date.

I double checked this. There are posts that haven’t been updated since 2014 or 2011, yet they show 6 februari 2021. I even went into phpMyAdmin and the post_modified field shows the correct date (not 6 februari 2021).

Does anyone have an idea what it causing this or how to fix this? I have some suspects:

  • I’m using older php version: 7.2.34
  • I’m using an old sql server (WP site diagnose says so)
  • I vagely remember doing a sort of database update. Yoast SEO promted me to do something for indexing purposes.

Retrieve date that sequence value was used?

I have an OOB system that has hundreds of tables. Each table has a ROWSTAMP column (integer) that gets populated by a trigger — each time a record is created or updated. All the tables/triggers use the same db sequence. Each time a record is updated anywhere in the db, that one sequence is used to get the next available integer. (I suppose I could consider the sequence to be a sort of global sequence).

IBM: Usage of ROWSTAMP column in Maximo tables

It’s unfortunate that those ROWSTAMP columns are integers, and not dates. What I really need in the tables are CHANGEDATE columns. Dates would be useful for data entry troubleshooting, reporting, and analysis in general. But I can’t really justify customizing hundreds of tables and adding hundreds of triggers in the OOB system. The customized tables wouldn’t be supported by IBM and it wouldn’t be worth the effort/added complexity.

I feel like those ROWSTAMP columns are so close to being useful to me. I can’t help but wonder:

Is there a way to retrieve the date that those ROWSTAMP sequence values were generated?

For example, and I doubt this is possible, could I add a DATE column to the sequence, and then join from my table to the sequence to get the date? Or could I use some sort of logging mechanism on the sequence to put rows (with dates) in a table whenever the next sequence value is used?