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
1 answer
26 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
0 answers
33 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
-3 votes
0 answers
69 views

Apex and LWC don't agree on Date being passed

The LWC is calling an APEX method that returns a list of Asset objects. It's returning a Date field. Here's what debug shows for two records: Record 1: "Close_End_Date__c":"2023-11-03&...
JRob's user avatar
  • 1
0 votes
1 answer
29 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
48 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
26 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
110 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
  • 29
1 vote
2 answers
54 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
28 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
199 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
74 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
63 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
69 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
33 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
28 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
186 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
0 votes
0 answers
128 views

JDK Locale Format Retirement

I received an email from Salesforce informing that the JDK local format will be retired JDK Locale Format Retirement with the Spring ’24 release. https://help.salesforce.com/s/articleViewid=000380618&...
arnaud's user avatar
  • 104
1 vote
1 answer
222 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
226 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
  • 135k
0 votes
1 answer
47 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
119 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
0 answers
24 views

Unable to find the correct syntax in a Row-Level Formula

Like others, new to salesforce and struggling with what is likely a simple issue, please forgive. I am working in Leaseworks, an application written on the salesforce platform. I have a column of ...
Pejoham's user avatar
0 votes
1 answer
99 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
895 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
153 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
  • 104
0 votes
1 answer
64 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
  • 29
-1 votes
1 answer
406 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
0 answers
520 views

"The request body is either invalid or incomplete."

I'm using the analytics studio to build a dashboard right now. I put 2 reports about campaign influence, that I created via "Reports", one for customers and one for prospects. I want to put ...
Erugar's user avatar
  • 1
0 votes
2 answers
150 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
78 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
228 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
138 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
211 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
0 votes
0 answers
122 views

Apex Insert Date time as it is

Inorder to book appointment in FSL I am reading the available time slots for the service resource using getAppointment REST API and here is the response from API { "candidates": [ { ...
SFDC buddy's user avatar
1 vote
1 answer
125 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
257 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
77 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
412 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
114 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
43 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 vote
1 answer
54 views

Date.parse parses weird dates with no typeException

Date.parse('30/30/2019') works different in sandboxes. Everywhere typeException is thrown as expected, but in one sandbox this date is being parsed into 2021-06-30 00:00:00. I checked everything - api ...
Alexandre's user avatar
1 vote
1 answer
87 views

Getting a wrong date format when getting inbox messages on Android

I'm using the react native sdk for SFMC and I have some difficulties with getting the inbox messages from the Android platform. Somehow the date format is like: Fri Sep 30 11:16:00 GMT+02:00 2022 And ...
Nico Martens's user avatar
9 votes
1 answer
269 views

Winter 23 - ICU date Formats - Date.parse

I have observed in the last few days the following (locale = en_US): Date d = Date.parse('15/56/2023'); // run with api V55 System.debug(LoggingLevel.INFO,d); Environment ICU enabled? ...
cropredy's user avatar
  • 69.9k
-1 votes
2 answers
423 views

Can I set the field CloseDate on Opportunity to null or blank?

I know that I can use some workaround like that: opp.CloseDate = Date.valueOf('1900-01-01'); But is there a possibility to have that field not visible for some (cloned) Opportunities? (beyond hiding ...
SFGest's user avatar
  • 1
-1 votes
1 answer
1k views

How to get start and end date of a specific quarter

I'm looking to update the start date & end date of the specific quarter based on the year and quarter fields selected by the end user. I thought of trying with the Period object but I'm unable to ...
Pavan tej's user avatar
  • 1,439
1 vote
1 answer
112 views

Remove time stamp from a Salesforce Field in Marketing Cloud

I do want to remove the time from a Salesforce field retrieved from the object CampaignMember. I had tried this the following amspcript code in my email but I do still have errors to send it : %%[ VAR ...
Lamia Hafid's user avatar
0 votes
1 answer
653 views

Report Filter Date

I am looking to filter a date to show appointment dates for only this month to todays date (so not the entire month). Is there a relative date formula i can use for this? Thanks
user120752's user avatar
-1 votes
1 answer
98 views

convert kafka epoch date to normal salesforce date

I am receiving events from kafka which has logical type date fields "FirstDate": 37367, "LastDate": 86367, I am trying to convert it salesforce appectable format like below cont....
sfdc_to_learn's user avatar
2 votes
1 answer
934 views

Is it possible to use a date range as map's key and then use a date to find the entry?

I have a list of records that map to a particular date range. For eg: 1 Jan 2020 - 31 Dec 2020 -> Toyota, Aston Martin 1 Jan 2021 - 31 Dec 2021 -> Red Bull, Mercedes, Ferrari 1 Jan 2022 - 31 ...
N_H1922's user avatar
  • 315
0 votes
2 answers
897 views

SOQL to get all records with in a given date range

Below is my sample data: I am trying to form a query where I can get records within a date range. Date Range is start of the week to end of the week. For example I want all records that falls between ...
SfdcBat's user avatar
  • 4,751

1
2 3 4 5
14