Skip to main content

Questions tagged [date]

A value that indicates a particular day. Unlike Datetime values, Date values contain no information about time

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

Context Text to Date

Does anyone know how to convert a human-readable date text such as "Jan 10, 2024 10:42 am (PST)" into a Date value (i.e. 01/10/2024)?
Robert NG's user avatar
-1 votes
1 answer
47 views

How to make a formula with correct difference between dates in months?

So I need a formula field to print a difference in months between 2 dates, and it has to be precise to 2 decimals. So, my variant is: (EndDate__c -EffectiveDate__c) / 30.5 or, with the other variant ...
SlavaBychenko CT's user avatar
0 votes
2 answers
52 views

Help with date formula

I am trying to create a date formula that will automatically roll over 365 days once the date has passed. I have a compliance report that is due annually on the anniversary date of the contract start ...
MadZott's user avatar
  • 11
3 votes
1 answer
107 views

How to write a formula to match a month prior to today's date with a date field on the contact

I'm using this formula from the Salesforce community board post to find one month prior to a work anniversary date. [DATE(YEAR(TODAY()),MONTH(ADDMONTHS(Date,-1)),DAY(ADDMONTHS(Date,-1)))] In my flow, ...
Megan's user avatar
  • 33
0 votes
1 answer
60 views

Apex - Calculating a bi-weekly date based on inputs

I have an invocable that I plan to use that can help let a flow user choose to execute a process only every other week based on their inputs of "Current Day of the Week" (string), and a ...
user1702965's user avatar
0 votes
0 answers
33 views

Formula Salesforce all Dates in one Filter

I am building a CRM report with customer engagement from business communications. In the report, for each mailing, I will group data such as Open, Click, etc, which are obtained by counting dedicated ...
Fabrizio Mastracci's user avatar
0 votes
1 answer
40 views

How do I filter a dashboard based on a date using url parameters?

I want to dynamically filter a dashboard to see only records with a field on a specific date. The documentation doesn't explain how to write a date as a url parameter. I keep getting the same error &...
Matias Bangueses's user avatar
0 votes
1 answer
35 views

Update EndDate by calculating through start date +duration(picklist field)

I wanted to updated the End date whenever the start date is update and it should always calculated the end date as below End Date = start Date + warranty duration field. the issue here is warranty ...
Puja's user avatar
  • 13
1 vote
1 answer
73 views

How to determine start of week for a given locale in Apex

My biggest complaint about SF is there are some many places where functionality is wired to the current User's identity when I have to do something in Apex on behalf of a user other than the currently-...
Ken's user avatar
  • 450
1 vote
1 answer
460 views

Format Date field to pass to OmniScript

I am using Apex to retrieve 2 Date fields from the FundingOpportunity object and I want to pass them back to my OmniScript via Integration Procedure. However the issue I'm running into is they are ...
stormy's user avatar
  • 51
0 votes
1 answer
48 views

How do we change default drop down values in Date Time field for Time drop down?

I have a Date Time field, in Time Drop down the values display as 12.00 am, 12.15 am, 12.30 am and so on, but i need only to show interval with 1 hr, like 12 am, 1 am, 2 am and so on. Please help on ...
Harikrishna Parvatam's user avatar
-1 votes
2 answers
749 views

Change date format like dd/mm/yy

Here is my code, I am trying to change date format from YYYY-MM-DD to DD/MM/YY format. How Can I resolve with this one? As well I am passing the value and label to the parent component that is also ...
blackFire's user avatar
1 vote
1 answer
86 views

Inserting a date field with soap API

I was trying to use Soap API to update DatedConversionRate, as that salesforce object does not allow the use of Dml. I am using advanced currency management. How do I avoid the clash of the ...
zoboso's user avatar
  • 15
-1 votes
1 answer
75 views

Date conversion from string dd-mmm-yy

I am getting date as a string '03-Sep-24' from an external system. What is the easiest way to parse it and save it in a date field?
vivekvismayam's user avatar
0 votes
1 answer
1k views

LWC - How to set current time when having date already? (Converting Date to DateTime)

I need to convert a Date to DateTime and display the value in LWC. I would like to calculate this on LWC's side not Apex. I already got the logic and calculated for Date. Now I want to append the time ...
Pam's user avatar
  • 107
0 votes
1 answer
82 views

Method does not exist or incorrect signature: void date() from the type Date

As per the title, I am encountering this issue when running an anonymous apex script: List <ServiceContract> serviceContractList = [SELECT Id, Status__c, Status FROM ServiceContract WHERE ...
Jaemy Malik's user avatar
0 votes
1 answer
241 views

Change from text type to date type in Data Stream in Data Cloud

Data Stream in Data Cloud wants to create Formula Fields and convert existing text-type columns into date types. The value of the column in the existing text format is '20231101', and we tried three ...
user141349's user avatar
0 votes
1 answer
32 views

I need help building a date timer that relates between objects

This was my guidance for this task: Problem: We have Production records and Requirement (RFI) records. We need to be able to track the 90 Days from an initial RFI Date regardless of the number of RFIs ...
Jesse Lebhar's user avatar
-1 votes
1 answer
61 views

Automation for birthday adding contacts the day after instead the exact day

we're experiencing some issues with a birthday automation query. Our query runs everyday and should filter contacts from 2 DE (contacts that are celebrating their birthday on that day) and put it in a ...
lisim's user avatar
  • 1
0 votes
0 answers
118 views

Row level formula: Pull value between two dates

I am trying to make a row level formula to identify dates that are in Q1 (Sep, Oct, Nov) of two years of fiscal data. I am able to distinguish between FY23 and FY24 using IF(Case.End_Date__c > DATE(...
Camille_03's user avatar
0 votes
1 answer
526 views

How to find first Monday from given date?

I'm trying to find the first Monday from a given date, and so far I've come up with the following formula, but it returns the first Monday of the month for the given date. Could you help me fix it, ...
Sebbie's user avatar
  • 91
1 vote
2 answers
122 views

Creating a due date formula based on case types with different working days

I keep getting an error message saying there's missing ")" I have seen multiple formulas using mod functions and using 1962 as start off days, and honestly when I used those in Salesforce ...
Jasmine G's user avatar
-1 votes
1 answer
40 views

Reports to cleanup

I am trying to get a list of reports that need to be deleted from Salesforce. I have created a report of reports with the below criteria. The report seems fairly accurate and I am trying to get the ...
Balaji Pooruli's user avatar
0 votes
1 answer
473 views

How do I subtract dates in LWC's JS?

I am developing an LWC. I want to subtract two dates and get the number of days between them so that I can conditionally render HTML based on the result.One of the dates is a field Here's my current ...
Vinay Temburnikar's user avatar
0 votes
1 answer
111 views

I have a req to show different date time values based on different condition. One to display time in ISO, then in full date along with time & zone

I want to display time in 3 different formats, along side follow the translation strategy as well. That is if user selects to translate the page, user should be able to see the date in his/her local ...
SF Learner's user avatar
-1 votes
1 answer
109 views

Finding the average of dates using flow

I have a flow that creates a collection of dates of birth. my goal is to add them together and divide by the count to get the average date of birth. the amount of DOBs in the collection can change ...
la-Ola14's user avatar
1 vote
1 answer
231 views

Flow Formula Returning Null

I have a CSV file with a Date of Birth field in the format of "MDDYY" or "MMDDYY". I'm importing with Data Loader to a Text field, which triggers a Flow to fire upon record ...
Snowlian's user avatar
-1 votes
1 answer
129 views

I have a requirement to check if date given on object is greater than today's but should be less than next 5 business days. How to apply that logic?

I am able to calculate easily if it is greater than today. setConditionalFormatting(){ if(this.myTaskWrappers){ this.myTaskWrappers = this.myTaskWrappers.map(item => { ...
SF Learner's user avatar
0 votes
1 answer
36 views

Setting Field Validation for Date Field Typo

I have a field validation for close date on the opportunity object. The goal is that the date cannot be over 4 years ago. This date field is part of flow, and I noticed that when I did the date ...
Jasmine G's user avatar
-1 votes
3 answers
594 views

how to convert date from yyyy-mm-dd to MMM d, yyyy

I have a date as yyyy-mm-dd and i want to convert it into MMM d, yyyy in Apex. I was trying date method and converting it to string. I have today's date as '2023-07-11' and i want to return it as 'Jul ...
SF Learner's user avatar
1 vote
1 answer
434 views

LWC - render component onclick event

I have a lightning button and I have an instance of js Date class. When I click on a button I want it to to show me a date that was week before (subtract 7 days). Here is my .html file: <template&...
Appendix's user avatar
4 votes
1 answer
341 views

Is this a bug in Apex DateTime.format?

I have a failing test that I've narrowed down to the DateFormatTest.d31 case below. The test results are: TEST NAME OUTCOME MESSAGE ...
Keith C's user avatar
  • 136k
0 votes
1 answer
96 views

How can find no of working days between CreatedDate and one user created Date field in apex

I need to find no of working days between CreatedDate of record and a new custom field of Date.I am using businesshours to find no of working days. the issue is CreatedDate will return DateTime object ...
greeshma.e's user avatar
-1 votes
1 answer
316 views

Get time to close, instead of days

I'm trying to get a column added to a Salesforce report for case management. Using the SF Lightning experience. There are 2 fields available currently: Date/Time Opened Date/Time Closed These fields ...
Joseph's user avatar
  • 1
0 votes
1 answer
130 views

converting DateTime to String returns the wrong Date as a String

I have the following code to get the DateTime for EST Time Zone Timezone tz = Timezone.getTimeZone('America/New_York'); DateTime now = Datetime.now(); Datetime localTime = now.addSeconds((tz.getOffset(...
potato46's user avatar
-1 votes
3 answers
2k views

Calculate the Fiscal Quarter of a Date in a Formula Field if the FY starts in Aug

As the title suggests I'm trying to identify the fiscal quarter a CloseDate of an opportunity falls in, provided that the FY starts in Aug. I have tried this as per document: https://help.salesforce....
Apex Srinivas's user avatar
1 vote
1 answer
206 views

Best practices Use == or isSameDay apex date

Currently in production I check if two dates are identical in apex by doing date1 == date2 I see in the documentation that there is also isSameDay Would you know if using == between two dates is a ...
arnaud's user avatar
  • 106
0 votes
1 answer
103 views

How do you write DATE() with a wildcard on year?

In my flow, I need to check whether a record's date month and day match a specific date but not the year. So, I have a basic decision item that looks like this: {!Record.StartDate} = DateVariable I ...
Sebbie's user avatar
  • 91
-1 votes
1 answer
758 views

Validation Rule to Restrict date within current fiscal year?

I need help creating validation rule to restrict date between the Current Fiscal year of the company. Say, the user should be able to only select dates between Oct 1 to September 30 of the following ...
Rahul Miglani's user avatar
0 votes
2 answers
221 views

AMPScript: Is there an easy way to have dynamic date format based on Same Month vs Different Months?

I want to create a list of events that will show event start dates and end dates. I have a data extension that stores the StartDate and EndDates. Is there an easy way to make the date format dynamic ...
Scott Lam's user avatar
0 votes
1 answer
127 views

How to use order by clause for dates

How would you go about getting the most recent date from a table? I've been trying to use the clause order by but I get back the following error: "An error occurred while checking the query ...
Giada Masotti's user avatar
0 votes
1 answer
307 views

If a record exists with the same Date as another do not create the record

I have a Salesforce/Visualforce page which allows my user to create entries out of a list of users by dragging them onto a sudo-schedule. Once the entry is created it will display some basic ...
Mateo Matijevic Bosnjak's user avatar
-2 votes
1 answer
191 views

Date Parsing In Apex

I am having birthdate like this as string 'November 1, 2012' and I want to find the age pertaining to current date. I am trying to convert first into date as like below Date.parse('November 1, 2012') ...
SFDC buddy's user avatar
0 votes
1 answer
316 views

Converting PST time to UST TIM

I am having a time like this which is in PST Time zone '2022-12-29 08:00:00' and I am trying to convert this into UST whose output has to be as '2022-12-29T16:00:00Z' 2022-12-29 08:00:00 (PST) --> ...
SFDC buddy's user avatar
1 vote
1 answer
148 views

Field Formula for Soonest Date After X Amount of Days

I'm trying to create a couple of fields to calculate the eligibility date for employee benefits. -The first one should return a date of either the 1st or the 15th of the month 60 days after Hire Date. ...
Jaymee's user avatar
  • 13
0 votes
1 answer
388 views

Format Date from Datatable selectedRows

In my LWC I have a Datatable with a column for "Date From" - below is the column configuration { label: 'Date From', fieldName: 'werDateFrom', type: 'date', sortable: true, ...
Jeff Callahan's user avatar
0 votes
0 answers
109 views

How do I put a DATE type value in a String field in a Marketing Cloud data extension

I'm trying to do this sql query, but I'm getting an error when converting the type date to string.... I've tried using CAST/ CONVERT/ TRYCAST .. but I must be doing something around because Marketing ...
Thais Carolyne Souza's user avatar
1 vote
0 answers
627 views

Calculate Salesforce Case response time

I'm new with salesforce formula and I have this requirement to compute the business hours with mins. in salesforce case. what i did is that i set-up one field in case objects (data type = formula). ...
Explorer013's user avatar
-2 votes
1 answer
146 views

AMP Script - Populate last date of the third month in DD-MM-YYYY [closed]

set @todayUS = Now(1) set @tomorrowUS = DateAdd(@todayUS, 1, "d") set @yesterdayUS = DateAdd(@todayUS, -1, "d") set @threeMonthsDate = dateadd(@today, 3, "M") set @month =...
Apoorva's user avatar
  • 11
-1 votes
2 answers
69 views

Error in date class

I am tr4ying to concatenate two date fields. But I'm getting this error: "Date expressions must use Integer or Long" eg: System.debug(date.today()+date.today());
Goutham's user avatar

1
2 3 4 5
15