I would like to send an email if my URL is expired.
For that, I have created a saved search and a custom transaction field.
My goal is to show the transaction record in the saved search, from the moment the date is expired.
I tried with formula date but it return only if the date is before today. But it can happen that we are the same day and that the url is expired for 1min or 1hour.
Ex: Today = 13/09/2022 3:00 pm and expiration date is 13/09/2022 2:59 pm
So I tried with Formula numeric to do:
{customfield} - {today} is less than 0
But Netsuite return an unknown error.
So I tried:
TO_CHAR((NVL({customfield},{today})-{today})) is less than zero
But it return this kind of value so it's always zero
+000000000 20:57:33.000000
or
-000000000 02:26:33.000000
or
+000000000 00:00:00.000000
How can I do to send an email when the DateTime from my custom field is in the past?
The formula type you select specifies the data type for the result returned. When you select "Formula (Date)" (formuladate) or "Formula (Date/Time)" (formuladatetime), NetSuite will convert the returned difference into a time interval formatted as a date or timestamp. For numerical comparison, use "Formula (Numeric)" (formulanumeric) instead.
Related
I'm trying to convert a text string into a date in Notion to build a birthday reminder system in my database.
Bigger picture, I want a database view with the birthdays that are coming up in the next month. Some people I know their actual date of birth, and for others I only know their birthday. I enter the birthdate for the people whose birth year I don't know as the current year.
The filters allow you to select a date relative to the present, but not a date whose anniversary is coming up. So to fix this, I am creating a field that reformats the birthdate as a date in the current year, and filtering based on that.
I successfully built the new date, but it is a text string. In order for the filters to work, it needs to be formatted as a date.
I tried formatDate but that gives me an error.
For example:
formatDate(concat(prop("Birthday"), ", ", prop("thisYear")), "MMMM D YYYY")
Gives error:
Type mismatch concat(prop("Birthday"), ", ", prop("thisYear")) is not a Date.
It appears formatDate only reformats an existing date, it doesn't convert a string into a date. I can't find a function that converts a string into a date. How would one do that?
to convert the date you have in text format into a prop date, you have to start from 01 Jan 1970, this is the date Notion use to refer every single date into ms.
With this formula you will have 01 Jan 1970 from now:
dateAdd(dateSubtract(dateSubtract(dateSubtract(dateSubtract(dateSubtract(now(),
year(now()) - 1970, "years"), month(now()), "months"), date(now()),
"days"), hour(now()), "hours"), minute(now()), "minutes"), 1, "days")
Now you have to add to this date months, year and days you have into your birthday prop.
To do this you simply have to use he dateAdd formula, so you will have:
dateAdd(dateAdd(dateAdd(dateSubtract(dateSubtract(dateSubtract(dateSubtract(dateSubtract(now(),
year(now()) - 1970, "years"), month(now()), "months"), date(now()),
"days"), hour(now()), "hours"), minute(now()), "minutes"),
prop("Giorni"), "days"), prop("Mese") - 1, "months"), prop("Anno") -
1970, "years")
You have to consider that in my example, prop("Giorni"), prop("Mese") and prop("Anno") are already numbers.
If you have them into a text field you first have to extract them with the slice formula and convert them into number with toNumber formula.
I hope I helped you, sorry for my English but I'm not native English speaker.
Bye
I have a date field custentity_autopayprocessingdate whose value is 11/16/2021.
I have an invoice date field custbody_inv_processdate and I would like the value of the invoice date field to be: Current Month, Day from custentity_autopayprocessingdate, and current year
What's the best way to achieve this, so far I cannot do it outside of a search?
Options:
Replace custentity_autopayprocessingdate with an integer limited to 28 (Feb) and calculate date on invoice create
Calculate through workflow or suitescript and set
Search Formulas (working but only in search context - transaction search mainline)
/*Workflow 35 Value*/to_date(To_Char({customermain.custentity_autopayprocessingdate},'MM/dd/')||to_Char({today},'yyyy'),'MM/dd/yyyy')
/*Extract Workflow Option*/To_Date(EXTRACT(MONTH FROM {customermain.custentity_autopayprocessingdate})||'/'||EXTRACT(DAY FROM {customermain.custentity_autopayprocessingdate})||'/'||EXTRACT(YEAR FROM {today}),'MM/dd/yyyy')
/*To Char 2*/To_Char({customermain.custentity_autopayprocessingdate},'MM/dd')||'/'||To_Char({today},'yyyy')
I have a number of excel strings in the format "Mon Nov 25 17:20:47 +0000 2019"
I found an earlier post that recommended using =DATE(RIGHT(O2,4),MONTH(DATEVALUE(1 & MID(O2,5,3))),MID(O2,9,2)) to create a usable date field. However, this drops the time which is an important piece of information.
How can I include the time with the date in order for excel to recognize and sort all the information included in the field?
Thank you in advance!
You can just use the same logic with the date formula, but use TIME instead of DATE and of course extract the correct time into the formula =TIME(MID(O2,12,2),MID(O2,15,2),MID(O2,18,2))
Edit:
to combine them both in one field, you will need to add them =DATE(RIGHT(O2,4),MONTH(DATEVALUE(1 & MID(O2,5,3))),MID(O2,9,2)) + TIME(MID(O2,12,2),MID(O2,15,2),MID(O2,18,2))
The rationale of this is because:
Date is expressed in whole numbers i.e. 1 = 01/01/1900, 2 = 02/01/1900, 3 = 03/01/1900... 43794 = 25/11/2019, etc.
Time is expressed as a fraction of the day i.e. 0.5 = 12 hrs/12PM, 0.66666 = 16 hrs/4PM, etc.
so lets say you have 1/1/2019 12.00 PM, the date part that gives 1/1/2019 will be 43466 and the time part will be 0.5. Adding them together will give you 43466.5, and when converted to a date time format it will show as 1/1/2019 12:00 PM.
You can use string functions to create an unambiguous date string, then turn it into a date/time value with a mathematical operation (adding the time value in a string form).
=(MID(A1,9,2)&"-"&MID(A1,5,3)&"-"&RIGHT(A1,4))+MID(A1,12,8)
You'll need to format the result as something appropriate: eg: dd-mmm-yyyy hh:mm
In Spotfire, I created a Cross Table. In the Cross table>Properties>Data>Limit data using expression:> I put the following:
Date([Discharge Date])=>'06-01-2019'
I get the error message "The expression is not valid after '>' on line 1 character 19"
I tried Date([Discharge Date])>'06-01-2019 but it still does not work
The code is Date([Discharge Date])=>'06-01-2019'
I hope to be able to use Date([Discharge Date])=>'06-01-2019' in the Cross table>Properties>Data>Limit data using expression:
enter image description here
I tried the Date(2019,6,1) but still got the error message.
enter image description here
According to the Spotfire Docs:
Creates a Date from a column or values. If a single argument is given,
the input column can be of type String or DateTime. If a String is
specified, the date must be written on a form that Spotfire can
recognize and all parts of the date (year, month and day) must be
present. If three integer arguments are given, then the first
argument is the year, the second is the month and the third is the
date in that month.
Example: Date([Column]) Date(2007, 05, 17)
Change your date formatting to [Discharge Date] >= Date(2019,06,01) and try again.
In cell A1 we have this:
=CUBEMEMBER("OurCube","TAIL([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0)","TargetMember")
It works fine and returns a single member that is yesterday.
In A2 we have a formula that is attempting to return the actual date - so I thought the CUBEMEMBERPROPERTY function would work:
=CUBEMEMBERPROPERTY("OurCube",A1,"member_caption")
The above returns #N/A
I don't know what CUBEMEMBERPRPERTY does but apparently it doesn't mean what you think it means!
If you need to get a certain property of a field according to another field, this is the way to do it:
Let's say, I wanted the Financial Year's month name (FY Month Name) based on a certain date key (I live in Australia, the financial year finishes at June):
=CUBEMEMBER("ThisWorkbookDataModel", "EXISTS([Dim Period].[FY Month Name].Children, [Dim Period].[Datekey].[20160731])")
And if the value of "20160731" has been in a certain cell, it would go like this:
=CUBEMEMBER("ThisWorkbookDataModel", "EXISTS([Dim Period].[FY Month Name].Children, [Dim Period].[Datekey].["&A8&"])")
Both would give me the correct answer: 01 - July
And I would like to thank the following posts for their help:
https://wessexbi.wordpress.com/2014/02/16/a-cubememberproperty-equivalent-with-powerpivot/
http://www.mrexcel.com/forum/power-bi/730287-function-cubememberproperty-always-return-n.html