Calculated Column based on Date

I am looking to return a calculated value based on a column named Date, I have three options I need to consider: If Date is between today and next 6 days return A If Date is more than 6 days ahead but in this month return B If Date is this after the 10th day month and before the end of the following month return B else return C

Any suggestions on how to achieve this?

Migrate date field from csv to Drupal 8 using format_date

have been trying to import the date fields from a CSV file to Drupal 8 using format_date function. followed these two answers Import a date from CSV to Date field How to convert year to date with Migrate

but didn’t work for me. it keeps translating everything into 1969/12/31 19:33. Does anyone know why?

here is my YAML file where field_date is machine name of my content type date field, and Date is the field name in CSV. and the date format in CSV is like 12/22/12 12:22

field_date: plugin: format_date from_format: 'm/d/y H:i' to_format: 'Y-m-d\TH:i:s' source: Date

Migrate date field from csv to Drupal 8 using format_date

have been trying to import the date fields from a CSV file to Drupal 8 using format_date function. followed these two answers Import a date from CSV to Date field How to convert year to date with Migrate

but didn’t work for me. it keeps translating everything into 1969/12/31 19:33. Does anyone know why?

here is my YAML file where field_date is machine name of my content type date field, and Date is the field name in CSV. and the date format in CSV is like 12/22/12 12:22

field_date: plugin: format_date from_format: 'm/d/y H:i' to_format: 'Y-m-d\TH:i:s' source: Date

How to automatically set date in a cell when a different cell value is changed by a formula from data on another sheet?

I currently have a column, e.g. ColB, containing SUMIF functions with its data range from other sheets and a column, e.g. ColC, with dates that I want to automatically update to the last date ColB’s value were changed. Here’s a picture to illustrate what I mean:

enter image description here

From searching around, I found the following Google Apps Scripts but they only seem to work if the change to ColB’s cells is a direct edit as opposed to its value changing from the SUMIF function recalculating new data:

Example Script 1:

function onEdit(e) { if ([2, 5, 8, 11].indexOf(e.range.columnStart) != -1) { e.range.offset(0, 1).setValue(new Date()); } }

Example Script 2:

    function onEdit() {  var s = SpreadsheetApp.getActiveSheet();  if( s.getName() == "Sheet1" ) { //checks that we're on the correct sheet    var r = s.getActiveCell();    if( r.getColumn() == 13 ) { //checks the column      var nextCell = r.offset(0, 1);      if( nextCell.getValue() === '' ) //is empty?        var time = new Date();        time = Utilities.formatDate(time, "GMT", "HH:mm:ss");        nextCell.setValue(time);    };  }; } 

Is there a Google Apps script that can execute what I want? Thanks for any help and suggestions!

Calculated column formula for an expiry date based on drop down selection

I have a dropdown list named “Expiry Period” with options as follow:-

  1. Yearly
  2. Monthly
  3. 2 weeks
  4. 1 week
  5. Other options might be added later on

Now I want to create a calculated column named “Expiry Date” which will calculate the expiry date based on the (modified date + the “Expiry Period” selection). For example if the user edit the page on 1 June 2019 , and the user select “Yearly” from the “Expiry Period” , then the “Expiry date” calculated column will be (1/June/2019 + 365 = 1/June/2020), while if the “Expiry Period” = Monthly then the “Expiry date” calculated column will be (1/June/2019 + 30 = 1/July/2020),and so on . But I am not sure if I can define such a formula inside calculated columns?

Calculated column formula for an expiry date based on drop down selection

I have a dropdown list named “Expiry Period” with options as follow:-

  1. Yearly
  2. Monthly
  3. 2 weeks
  4. 1 week
  5. Other options might be added later on

Now I want to create a calculated column named “Expiry Date” which will calculate the expiry date based on the (modified date + the “Expiry Period” selection). For example if the user edit the page on 1 June 2019 , and the user select “Yearly” from the “Expiry Period” , then the “Expiry date” calculated column will be (1/June/2019 + 365 = 1/June/2020), while if the “Expiry Period” = Monthly then the “Expiry date” calculated column will be (1/June/2019 + 30 = 1/July/2020),and so on . But I am not sure if I can define such a formula inside calculated columns?

Display date picker not inline in Drupal 7 Forms API

I have installed Date Picker Module and it works fine.

enter image description here

Below is the code:

$  form['date'] = array(     '#title' => t('Select your birthdate'),     '#type' => 'datepicker',     '#date_format' => 'd/m/Y',     '#date_year_range' => '-100:+0',     '#default_value' => date("Y-m-d H:i:s", time()), ); 

I want to display not it inline. I want it to be a textfield and when the focus is on the textfield, the calendar will pop-up. What configuration should I tweak to make it possible? Thanks.

ubuntu hung up on Date and time page

I just got through installing Ubuntu 18.04 into Oral Virtual Box. All went well. After restart, Ubuntu opened in desktop page. I clicked on Thunderbird to register and walked away for a moment. When I returned the desktop was gone and had a new desktop with time and date. I clicked on it but it stays there. No icons anywhere. How do I get back to original desktop with icons on left?

file_put_contents – ISO 8601 date in filename returns failed to open stream: No such file or directory

I am trying to log errors to file using file_put_contents method.

I have tried the following code and it works:

file_put_contents(date("j-n-Y G:i").'.log', $  log, FILE_APPEND); 

But i want to name a file in ISO 8601 date format, like this:

file_put_contents(date("c").'.log', $  log, FILE_APPEND);  

But it returns the following error:

failed to open stream: No such file or directory