Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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
2k views

Making 24 hours difference in formula

what is 1.8 in this expression. I have seen people using now() + (-1.8) or now() + (1.8) for making 24 hours difference. What exactly is 1.8
0 votes
1 answer
23 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 &...
0 votes
2 answers
2k views

How to use long date format in LWC

So I've been trying to understand the use of dateTime.longDateFormat in the documentation located here: [https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_i18n][1]...
0 votes
1 answer
175 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 ...
1 vote
4 answers
3k views

using today date in Database.getQueryLocator query String throwing errors

I am running a batch class. I am providing query in string format. I am facing issue with using a filter criteria StartDate__c>=:System.today() In a direct query, i could write something like List&...
0 votes
1 answer
815 views

Combining relative and static date filters in the dataflow Salesforce Wave/Einstein Analytics

I've created an opportunity, revenue, account, accountplan dataset. On the opportunity is a highly complex revenue logic so we decided to have a revenue field for each month. To get all those objects ...
0 votes
1 answer
34 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 ...
1 vote
1 answer
44 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-...
1 vote
1 answer
144 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 ...
1 vote
2 answers
3k views

How to remove the time 00:00:00 from a date format and still maintain the date type

PROBLEM: I converted a string to Date format. Eg: String dateToParse = year+'-'+month1+'-'+day; Date ds = Date.parse(dateToParse); OUTPUT: 2020-07-24 00:00:00 (output is a Date type variable) Expected:...
1 vote
3 answers
3k views

Formula Question: Record a date of first activity on contact object

I need to create a custom field on my Contact object that records the date of the very first call that has happened with a Contact record. I thought about creating a formula field on Contact, and ...
2 votes
2 answers
1k views

DatePicker Issue

I have two text field: One normal text field that accepts numbers. <apex:inputField value="{!FinancialAssCont.Down_Payment__c}" styleClass="form-control downpaymentAmount" onblur="...
0 votes
1 answer
32 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 ...
1 vote
2 answers
790 views

ui:inputDate updating error

<aura:attribute name="dueDate" type="Date"/> <aura:attribute name="dueDateString" type="String"/> <aura:handler name="change" value="{!v.dueDate}" action="{!c.dueDateChanged}"/> <...
-1 votes
2 answers
386 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 ...
1 vote
1 answer
78 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 ...
-1 votes
1 answer
61 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?
2 votes
1 answer
7k views

Calculate business days between two dates

I'm trying to create a formula that would calculate the business days between "Claim Filled/Submitted Date" and "Date/Time Closed" for claims turn time. I'm using the formula:  (5 * ( FLOOR( ( date_1 ...
0 votes
1 answer
777 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 ...
0 votes
1 answer
53 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 ...
-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....
2 votes
3 answers
26k views

Relative Date Value (THIS WEEK,NEXT WEEK,LAST WEEK)

I have below filter in List view for my custom object and client's locale is US English. Scheduled Date equals THIS WEEK List view retrieves all records with scheduled date from Sunday to Saturday....
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 ...
-1 votes
1 answer
59 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 ...
12 votes
2 answers
131k views

How to convert string to Date in apex?

What is wrong with this format while am upserting the date in an object? Route__c r =new Route_c(); r.Plan_Date__c = date.parse(strDate); upsert r; In the debug log, I get the error as |...
0 votes
0 answers
94 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(...
0 votes
1 answer
412 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, ...
1 vote
2 answers
1k views

Setting Future Date in SF using javascript

Hello stackexchange gurus. I have a problem with setting a future Due Date for a task using javascript in Salesforce. Below is the piece of code i use: var d = new Date(); d.setDate(d.getDate()+...
1 vote
2 answers
109 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 ...
-1 votes
1 answer
36 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 ...
0 votes
1 answer
103 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 ...
0 votes
1 answer
397 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 ...
-1 votes
1 answer
101 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 ...
0 votes
1 answer
2k views

How to get the range of Fiscal years from FiscalYearSettings based on Current FIscal Year Dynamically?

I am trying to fetch the Fiscal Year Setting Records using SOQL for the fiscal years based on current fiscal year. I need few records before the current fiscal year and a few records after the current ...
1 vote
1 answer
182 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 ...
1 vote
1 answer
381 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&...
-1 votes
3 answers
494 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 ...
-1 votes
1 answer
65 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 => { ...
0 votes
1 answer
30 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 ...
2 votes
2 answers
3k views

Calculate MAX between group of date fields

I have seen several posts about this, but all posts manage to successfully calculcate which date is the MAX (the one closest to today) but do not then return this date, only the number of days between ...
4 votes
1 answer
289 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 ...
0 votes
1 answer
80 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 ...
-1 votes
2 answers
2k views

Formula to put a date together seperatly Fields "Month" and "Year"?

In an custom Oject, that is filled with external market development data I got a picklist field "Month" (Picklist: 1,2,3,4...12) and a picklist field "Year" (picklist: 1990, 1991, 1992... 2020). Each ...
-1 votes
1 answer
265 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 ...
3 votes
4 answers
5k views

How to calculate duration between two dates(in months and days) using formula field?

My client wants me to write a formula field to return the duration(in months and days) between two date fields. For ex: If start date is "January 1st 2016" and end date as "December 31st 2016" then ...
0 votes
1 answer
182 views

Unable to calculate days in apex

I need to calculate days between two fields. So I use daysBetween to complete when I try to do with two dates. When I try with single values. But, when I try with list it throws an error like: Method ...
0 votes
1 answer
120 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(...
1 vote
1 answer
196 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 ...
0 votes
2 answers
4k views

Convert a datetime to date in SFMC

I have an issue converting a date/time to a string format date. Indeed, I would like to change the following date format : 'mardi 15 mars 2022 4:24 PM' to this format '15/03/2022' without the timedate....
0 votes
1 answer
96 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 ...

1
2 3 4 5
14