Questions tagged [date]
A value that indicates a particular day. Unlike Datetime values, Date values contain no information about time
697
questions
0
votes
1
answer
28
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 ...
0
votes
2
answers
116
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
72
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
53
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?
0
votes
1
answer
424
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
42
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 ...
0
votes
0
answers
91
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 ...
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 ...
0
votes
0
answers
75
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
286
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
87
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
35
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
331
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 ...
0
votes
1
answer
100
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 ...
-1
votes
1
answer
92
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 ...
1
vote
1
answer
144
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
votes
1
answer
41
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
29
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 ...
-1
votes
3
answers
398
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
vote
1
answer
323
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&...
4
votes
1
answer
263
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
78
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
1
answer
218
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 ...
0
votes
0
answers
25
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 ...
0
votes
1
answer
112
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
votes
3
answers
1k
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....
1
vote
1
answer
182
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
1
answer
89
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
votes
1
answer
546
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 ...
0
votes
0
answers
629
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 ...
0
votes
2
answers
190
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 ...
0
votes
1
answer
93
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 ...
0
votes
1
answer
274
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 ...
-2
votes
1
answer
159
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')
...
0
votes
1
answer
254
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) --> ...
1
vote
1
answer
145
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. ...
0
votes
1
answer
282
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,
...
0
votes
0
answers
96
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 ...
1
vote
0
answers
512
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). ...
-2
votes
1
answer
127
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 =...
-1
votes
2
answers
57
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());
1
vote
1
answer
65
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 ...
1
vote
1
answer
100
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 ...
9
votes
1
answer
303
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? ...
-1
votes
2
answers
489
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 ...
-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 ...
1
vote
1
answer
138
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 ...
0
votes
1
answer
782
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
-1
votes
1
answer
116
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....