Format the date of the previous day format yyyymmdd with VBScript

I need format the date of the previous day in this format, with VBScript :

yyyymmdd

And I have tried this solution :

NewData = Right(Year(DateSerial(Year(Date()),Month(Date()),1)),4)          & Right(String(2, "0")          & Month(DateSerial(Year(Date()),Month(Date()),1)), 2)          & Right(String(2, "0") & Day(DateAdd("d",-1, Now())), 2)  

But instead of getting :

20190630

I have :

20190730

Can you help me ?

Thanks in advance for any help.

Calculating average in SSRS Matrix Table alongside filtered columns to separate out current versus previous years

I have a dataset, returned from a SQL query, that has the following data:

  • TYPE_CODE
  • YEAR

The data set spans the years 2014 through 2019. The TYPE_CODE has 6 different values.

How do I setup an SSRS matrix to provide the following layout and data:

enter image description here

So far I have a matrix setup (see the pic below) that has a row group (TYPE_CODE1) for the TYPE_CODE data, and two column groups (YEAR_PREV and YEAR_CURRENT) that are filtered as follows: – The second column in the matrix is the YEAR_PREV group, and is filtered to not show 2019 data (YEAR <> 2019) – The 4th column in the matrix is the YEAR_CURRENT group, and is filtered to only show 2019 data (YEAR = 2019)

 -

This method correctly splits my data, with the green highlighted columns in the pic below representing what is correct:

enter image description here

What is not correct is the average column, as I cannot figure out how to setup that column to only average the columns to the left (the previous years – 2015-2018) and not include the column to the right (2019).

I have tried several different expressions to no avail, primarily trying to limit the count function to only the YEAR_PREV group, like so:

  =count(Fields!TYPE_CODE.Value, "PREV_YEAR")/4 

This throws an error telling me that something along the lines of “group cannot be used in aggregate function…”.

How do I calculate the average column correctly?

booking.com not canceling previous booking while booking another

I have already booked one hotel through booking.com. Now I want to book another. I want to keep both of these bookings for now and decide latter which one to cancel. Both of these hotels have Free cancellation period. And I have a long time in my hand. When I booked the second hotel I was prompted whether I want to cancel the previous booking or not.

enter image description here

If I procced to the next step without cancelling the previous booking will 8,032.89 be deducted from my credit card ?

Has there been any previous mentions of these Lesser Ministries before?

On page 122 of the Mage: the Awakening 2nd Edition sourcebook Signs of Sorcery, there is a sidebar that introduces Prelacy bonuses for members of Lesser Ministries of the Seers of the Throne mage order.

In it is includes the following information:

The Raptor (Sycorian) grants the Crown of Instinct. The character may ignore surrenders without spending Willpower, is immune to the Beaten Down Tilt and wound penalties and increases his own Doors in Social Maneuvering by his Life dots.

The Prophet (Kyrian and Horologian) grants the Crown of Agency. When she or another character uses Temporal Sympathy on a spell with her as the subject, the character counts as having a Strong Temporal Sympathy to any point in her own past. If a supernatural effect (including Time spells) alters history such that the character’s past is changed, she does not change immediately but only after her Time dots in turns, allowing her the opportunity to do something about it.

The only other place in the book that these Ministries are mentioned is in the descriptions of the ten Iron Seals (the major Exarchs who represent the Arcana), which each have a final sentence to the effect of “He is served by the X and Y Ministries,” with no further description.

I’ve checked the Mage the Awakening Second Edition corebook as well as the Seers of the Throne sourcebook for Mage the Awakening First Edition, and I can’t find any mention of the Sycorians, Kyrians, or Horologians, and I can’t find anything about them on Google, either. Is this the first time that these Lesser Ministries have been mentioned in a Mage book, or have they been mentioned in other (first edition) sourcebooks or official short stories that I haven’t checked?

Has there been any previous mentions of these Lesser Ministries before?

On page 122 of the Mage: the Awakening 2nd Edition sourcebook Signs of Sorcery, there is a sidebar that introduces Prelacy bonuses for members of Lesser Ministries of the Seers of the Throne mage order.

In it is includes the following information:

The Raptor (Sycorian) grants the Crown of Instinct. The character may ignore surrenders without spending Willpower, is immune to the Beaten Down Tilt and wound penalties and increases his own Doors in Social Maneuvering by his Life dots.

The Prophet (Kyrian and Horologian) grants the Crown of Agency. When she or another character uses Temporal Sympathy on a spell with her as the subject, the character counts as having a Strong Temporal Sympathy to any point in her own past. If a supernatural effect (including Time spells) alters history such that the character’s past is changed, she does not change immediately but only after her Time dots in turns, allowing her the opportunity to do something about it.

The only other place in the book that these Ministries are mentioned is in the descriptions of the ten Iron Seals (the major Exarchs who represent the Arcana), which each have a final sentence to the effect of “He is served by the X and Y Ministries,” with no further description.

I’ve checked the Mage the Awakening Second Edition corebook as well as the Seers of the Throne sourcebook for Mage the Awakening First Edition, and I can’t find any mention of the Sycorians, Kyrians, or Horologians, and I can’t find anything about them on Google, either. Is this the first time that these Lesser Ministries have been mentioned in a Mage book, or have they been mentioned in other (first edition) sourcebooks or official short stories that I haven’t checked?

List of previous and upcoming months to a given date (year and month)

I need a menu with buttons of months previous and after a given month, something like this:

| month | month | month | current month | month | month | month |

Can this function further be improved?

/** * Generates array of months previous and after given date * @param $  p_base_data       - array of base year and months,           if not provided current date is used ['year'=>false, 'month'=>0] * @param $  p_nr_prev_months - number of previous mounts to calculate * @param $  p_nr_post_months - number of upcoming mounts to calculate * @return populated array */  function buildListOfMonths( array $  p_base_date = ['year'=>false, 'month'=>0],                              int $  p_nr_prev_months = 5,                              int $  p_nr_post_months = 6) : array {     // init var     $  months_list    = [];     // setting base year and date if parameter not passed     $  base_year  = $  p_base_date['year'] ? $  p_base_date['year'] : date('Y');     $  base_month     = $  p_base_date['month'] > 0          ? (int)$  p_base_date['month']          : date('n');      // looping through prev to post number of months     for ($  i = -$  p_nr_prev_months; $  i <= $  p_nr_post_months; $  i++) {         // creating date object of actual date         $  date_obj       = strtotime(date($  base_year.'-'.$  base_month.'-01')." +$  i months");         // building array of months         $  months_list[]  = [ 'year'       => date('Y', $  date_obj),                                 'nr_month'   => date('n', $  date_obj),                                 'month_name' => date("M", $  date_obj),                                'current'    => (date('n', $  date_obj) == $  base_month) ? true : false ];     } // end for      return $  months_list; } // end func.