Sharepoint Calculated Date Value - sharepoint-2007

I've used this formula in my calculated column to indicate the date for 10 past the SENT date entered. It returns the date fine, but in other records without a date inserted it returns a value of 1/9/1900.
How can I add to this formula to leave the record blank if SENT is null?
=TEXT(Sent+10,"mm/dd/yyyy")

Check SharePoint Calculated Column Formulas. Your formula should be similar to this:
=IF(Sent <> "", TEXT(Sent+10,"mm/dd/yyyy"), "")
(I didn't test it)

Related

/ and - in different cells after same function

I'm trying to concatenate a column of dates and other of hours.
The fuction:
=CONCATENATE(TEXT(AGENDA!B9 ,"dd-mm-yyyy"), " ", TEXT(AGENDA!C9 ,"hh:mm:ss"))
works, but, some cells are in fuction format, dd-mm-yyyy, and some others are dd/mm/yyyy (the time is correct). I need them all with -
You have a non valid date in AGENDA sheet Fecha column note Luque, Hugo 20/08/2021 with month set to 20 !! and day is 08.
To add date validation, Select B2:B and go to Data data > validation > Criteria: date.
and select On invalid data: Show warning.
Fix the date one by one or take a look at the quick fix.
To check the date format:
Go to Formst > number > Custom date and time.
The Quick fix
To get date fixed with a formula from, mm/dd/yyyy to dd-mm-yyyy you need a helper column lets call it Fixed Date, with the formula.
=IF(ISDATE(B2)=False,CONCATENATE(INDEX(SPLIT(B2,"/-"),1,2),"-",INDEX(SPLIT(B2,"/-"),1,1),"-",INDEX(SPLIT(B2,"/-"),1,3)),B2)
Explanation
1 - IF(ISDATE(B2)=False check the date is valid if true return the original value example B2 if false calculate the formula.
2 - INDEX(SPLIT(B2,"/-"),1,2) to get the month column that resulted from SPLIT function with column set to 2.
3 - INDEX(SPLIT(B2,"/-"),1,1) to get the day column that resulted from SPLIT function with column set to 1.
4 - INDEX(SPLIT(B2,"/-"),1,3)) to get the yaer column that resulted from SPLIT function with column set to 3.
5 - CONCATENATE the columns with "-" in between.
Now you can paste your formula but adjusted in BBDD.AGENDA Sheet B3 cell.
=TEXTJOIN(" ",TRUE,TEXT(AGENDA!C2 ,"dd-mm-yyyy"),TEXT(AGENDA!D2 ,"hh:mm:ss"))
Notice that we changed AGENDA!B2 with AGENDA!C2.

Google sheets not recognising a date as a date

On this report I am trying to do some date analysis.
In column G I need to pull all the URLs from column A which have a closing date in the next 7 days.
And in column I, I need all the URLs which the closing date is in the past.
The issue is that when I try to reference the Closing dates in column E it does not read and as such work.
Could I get some help on making sheets read Column E properly and also some help on the formulas I need in Column G and I
Thank you
You might want to look at the DATEVALUE function:
=DATEVALUE(D2)
If cell D2 contains a date in the form of text (such as "26 May 2022"), this formula will return the date as a number. (You can then format the cell to display a particular date format if required.)
For URLs which have ended, you can then do:
=F2 < TODAY()
And for URLs ending in the next 7 days you will need something like:
=IF(F2<TODAY(), FALSE, IF(F2 - TODAY() > 7, FALSE, TRUE))

Last value of a column in Google Sheets

I was trying to use the following function;
=INDEX(D:D,COUNTA(D:D),1),
in order to get the last currency value of a column, but it returns #ERROR!.
The value im trying to extract
As I montly update this spreadsheet, it would make it very convenient if would etract the last value in the column, e.g. the value marked in the image.
Is there a way (in Google Sheets) to find the last non-empty cell in this column, such that when I update the spreadsheet with a new "last value" it would return that value?
The index(counta()) pattern will fail when the data is sparse, i.e., when there are blank values in the column.
The index(match()) pattern will fail when the data contains a value that is not a number.
To find the last non-blank value in column D, regardless of data type, use the +sort(row()) pattern:
=+sort(D1:D; not(isblank(D1:D)) * row(D1:D); false)
The formula uses semicolons as argument separators to make it work in any locale.
If the column has only currency (ie number) values then you can use something like:
=INDEX(D1:D, MATCH(999^99, D1:D))
or try:
=SORTN(D:D; 1;;ROW(D:D)*(D:D<>""); )

Date comparison in query not matching when the cells being compared are date but works if cells are made into text

Sample sheet for reference: https://docs.google.com/spreadsheets/d/1P1XTAFzI1-M0zJZtKiBviSfohXcqbzaPEnxHlQ4zDSU/edit?usp=sharing
Im trying to compare one date cell to a column of date cells. I am using the query function to list out all the matching rows. Specifically I am comparing the date column in Call Log Details sheet to the date cell B2 in the EOD sheet. When I make both the column and cell in the 2 sheets to be formatted into mm/dd/yy, the function doesnt work. But when I make both the column and the cell in the 2 sheets to be formatted into Plain Text, the function works and displays the rows. I cant have the column in the Call Log Details to be Plain Text since I am adding a calendar and will be doing calculations using dates. How am I able to make the comparison to work with at least the column being a date value and if possible also the cell?
Here is the formula I am using to output the rows found in the EOD sheet at cell B2:
=query('Call Log Details'!A2:X," select T where A = '"&B1&"' order by A,B,D",0)
query understands dates only in this format:
yyyy-mm-dd
use:
=QUERY('Call Log Details'!A2:X,
"select T
where A = date '"&TEXT(B1, "yyyy-mm-dd")&"'
order by A,B,D", 0)
suggestion for column T:
={"RESERVED!!!"; ARRAYFORMULA(
{IF('Call Log Details'!E2:E="",,CHAR(10)&
"DATE : "&TEXT('Call Log Details'!A2:A+'Call Log Details'!B2:B, "m/d/yy h:m AM/PM")&CHAR(10)&
"PT: "&'Call Log Details'!D2:D&CHAR(10)&
"FROM: "&'Call Log Details'!E2:E&CHAR(10)&
"RELATION TO PATIENT: "&'Call Log Details'!F2:F&CHAR(10)&
"CALL BACK# "&'Call Log Details'!G2:G&CHAR(10)&CHAR(10)&
"MESSAGE.: "&CHAR(10)&'Call Log Details'!J2:J&CHAR(10))})}

Returns the number of unique values in data studio when date matters

I have my dataset in Google spreadsheet and I wish to know the unique number of customers in a specific date range:
Let's say this is my data set
Customer Date
A 22/07/2017
B 24/07/2017
A 23/07/2017
I use this formula COUNT_DISTINCT(Customer) however because row 3 have different date from row 1 the output is 3 (however, I wish to have 2 as my output)
If you want to know the number of unique values in column A regardless of the date then would this formula work:
=COUNTUNIQUE(A2:A)
Or is you want to combine this with a specific date range then:
=COUNTUNIQUE(FILTER(A2:A,B2:B>=datefrom,B2:B<=dateto))
In this formula, datefrom and dateto can be either a value or a cell reference

Resources