=IF(DATE(YEAR([Compliance Date]),MONTH([Compliance Date])+11,DAY([Compliance Date])), “Due”, “Not Due”)

I am trying to create an If statement that looks at a date column in sharepoint and if its 11months after that date the column displays yes.

any help on this as:

=IF(DATE(YEAR([Compliance Date]),MONTH([Compliance Date])+11,DAY([Compliance Date])), "Due", "Not Due") 

doesnt work?

Select count date from multiple where conditions for each day

I have lot of coupons. I would like to learn for each day how many coupons from each campaign have been received by users. But I cannot write something like assigned_date for each select row

SELECT count(id)                                                  as number_of_coupons,        DATE_FORMAT(assigned_date, '%d-%m-%Y')                     as date,        (SELECT COUNT(id) FROM coupon WHERE campaign_id = 1 AND assigned_date=THIS MUST BE SOMETHING) as campaign_1,        (SELECT COUNT(id) FROM coupon WHERE campaign_id = 2 AND assigned_date=THIS MUST BE SOMETHING) as campaign_2 FROM coupon GROUP BY DATE_FORMAT(assigned_date, '%d-%m-%Y') order by STR_TO_DATE(date, '%d-%m-%Y') DESC 

So the result will be something like. How can I achieve this result?

+-------------------+------------+-------------+-----------+ | number of coupons |    date    |  campaign_1 | campaign2 | +-------------------+------------+-------------+-----------+ |               156 | 12-10-2019 |        6980 |       100 | |               177 | 11-10-2019 |        6980 |       100 | |                44 | 10-10-2019 |        6980 |       100 | |                94 | 09-10-2019 |        6980 |       100 | |                93 | 08-10-2019 |        6980 |       100 | +-------------------+------------+-------------+-----------+ 

Update Yes/No field if Date is today

I am trying to create an automated SLA field

I have a “Date Requested” Field and an “Outside of SLA” field.

Date Requested is formatted as a Date, Outside of SLA is formatted as a Yes/NO / True/False field.

I am trying to automatically update the “Outside of SLA” field if the “Date Requested” is later than “Today”

I understand it will have something to do with the IsToday() field but im not sure if the logic i am trying to apply will work within PowerApps/Sharepoint.

Is this at all possible? I feel like i am treating this too much like Excel but am pretty new to this. Apologies

Thanks for any advice

Field Modified shows date, but no time

In a view of a document library I have the field “Modified” and this is showing only dates but no time. I would like to display the time aswell.

From my understanding it is ill advised to alter this field OOTB, but rather to create a calculated field and format it the way I want.

I have checked the column properties for this Modified-field, and it is set to “Date and time”, which is why I find it curious that it only displays the date. In any case I have created another (calculated) field which I am attempting to format the way I want, but with not luck.

Under the Formula section of this new calculated field I am attempting to format “Modified” like this:

=TEXT([Modified],"dd.MM.yyyy hh:mm") 

I want the result to appear like this 14.10.2014 15:59. However, when trying to save the above formula I get the “Sorry, something went wrong” page and the mention that the syntax is probably wrong. I am unable to see any obvious errors with the syntax and have tried a multitude of approaches – like removing the “”, removing [] from modified and so forth.

I need the field to display time aswell and I am not sure if this is the best approach either. Anyone got any tips to how I could do this? Perhaps the calculated field approach isn’t the best either?

Get modification date of files in a directory and compare it to the system date

Currently I’m working in a tool to monitor files(.txt files) that appear in an specific directoy, however I need to run some validations:

1- it should be a txt file 2- it should be files from date of today 3- they should have an specific time in the directory, for example if a file is stuck more than 30 minutes it can trigger an alarm.

so far this is the code that I got:

Dim myfiles() As String = IO.Directory.GetFiles("C:path\", "*.txt")         Label4.Text = (String.Join(Environment.NewLine, myfiles)) 

or

      If Directory.EnumerateFiles("C:\path\", "*.txt").Count > 0 Then              Label1.Text = "ERROR"             Label2.Text = ""         Else             Label2.Text = "OK"             Label1.Text = ""         End If 

it also should do this with every file in the directory, so if there are 2 files for example. it should run the same validations in each file and display the results in a Label or textbox

thanks for your help

Convertir un String a formato date Time en PHP

Una consulta,

Tengo una funcion la cual al entregarle una fecha especifica me retorna el primer dia de la semana de la fecha entregada(hasta aca no hay problema).

El problema es que la funcion necesita un parametro del formato “DateTime”, y hasta el momento no he podido convertir un String y que la funciona me funciona correctamente.

Tengo el siguiente codigo:

<?php      if(isset($  _POST)){                   $  new_date = $  _POST['today']; // capturo la fecha que viene de un DatePicker           $  fecha = new datetime();          $  fechafinal = $  fecha->createFromFormat('d-m-y', $  new_date);                  // $  specifiedDate = new DateTime('10/09/2019'); este es el codigo original y funciona bien cuando al fecha se escribe manualmente.          $  date = firstDayOf('week', $  fechafinal);         echo $  date->format('l, jS F Y');       } ?> 

PD: este es el primer codigo en PHP y web que realizado, y estoy un poco perdido con el tema de las conversion de formato.

Move the Created By Date and User to another area, JavaScript Only

Trying to Modify one of my DispForm.aspx page. I was able to do the usual data-dsiplayName attribute in the span tag. However, the Created and Created By data is not showing up.

Is this because the content type is not showing up in the form? When I enabled the content type, it looks like Created and Created By are not in the Item Content Type. Is there a way I can add this to the two to the Form OR, a way to move the data to another location (trying separate Created by Date and Person and move at the top). Thanks.

SharePoint designer 2010 unable to update task list due date

enter image description hereI created a task approval Serial Workflow Designer 2010. Here every user should get two days time after one person approve his task. Inside the task workflow BEFORE A TASK IS ASSIGNED I’ve written below step

Add 2 days to Variable CreateDate (Output to Variable Date01)

Set Task Field Due Date to Variable Date01

Here the problem is for all approvals Due Date in Task list is setting same date and time. When I check in Log, I have noticed in Log Due Date is updating correctly but in Task its update the same due date for every user. Please advice