Questions tagged [date]
A value that indicates a particular day. Unlike Datetime values, Date values contain no information about time
680
questions
-2
votes
0
answers
37
views
formula field called in apex class
I have a I have a custom field with formula type: Year__c ,
The formula is : LEFT(Period_YYYYMM__c , 4)
I want to use just the year from this field for a function in apex class . When I use
...
-1
votes
2
answers
51
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
120
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
25
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
49
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
116
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
59
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
55
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
79
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
55
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
85
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) --> ...
0
votes
0
answers
62
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": [
{
...
1
vote
1
answer
72
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
103
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
41
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 ...
0
votes
0
answers
142
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
86
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 =...
0
votes
0
answers
33
views
Populate in my date field the latest date
I have 2 records types in my asset :
The licence with a field "expiration date" and
The module with one checkbox and one "Contract end date"
I succeed with a flow to populate my ...
0
votes
0
answers
109
views
Displaying Year in the footer of a custom salesforce email template
Question is: How do you display the current year in a Salesforce classic HTML email template? This would be where the copywrite section with the 2022 goes. This way it doesn't have to be manually ...
-1
votes
2
answers
27
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());
0
votes
0
answers
51
views
After Winter '23 release, some orgs suddenly enabled the test run for the ICU release update
This Monday, after the Winter '23 release went live this weekend, we were surprised that suddenly the test run of the ICU Locale Formats release update was enabled.
Did more people have this happen? I ...
1
vote
1
answer
40
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
56
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 ...
8
votes
1
answer
199
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
124
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
479
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
53
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
255
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
62
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....
2
votes
1
answer
483
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 ...
0
votes
2
answers
483
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 ...
0
votes
1
answer
2k
views
Need help using IF statement in Salesforce Flows
We're moving to Flows and I need a bit of help on IF statements in Salesforce. I've tried a few variations but with the IF statement when creating a DATE formula but I keep getting “Syntax error. ...
-2
votes
1
answer
454
views
Want to validate date in LWC [closed]
I am trying to validate date in lwc. When i enter date as "0000-05-05" it show its not valid but when i enter date as "0005-05-05" it shows its valid date and apex class throws ...
1
vote
1
answer
382
views
Creating sObject via REST - date format
Currently, I've used the postman to make a request to standard Saleforce API.
At the Date field I inputted year only.
As I expected, that should be inserted fail for that case.
But actually, the ...
0
votes
0
answers
49
views
To filter business days and selected holidays using SAQL/Data Recipe transformations
I am completely new to Tableau CRM and trying a requirement where I need to filter business days and selected holidays in my dataset.
Here is how my data looks like-
Date Reduce days ...
0
votes
1
answer
49
views
apex date not valid error
Sorry if asking same question again but really facing the issue with the bad input date I am new to salesforce if someone can guide me how to handle leap year and bad date in apex.
If someone enters ...
1
vote
1
answer
433
views
Using Date fields in process builder as conditions
I am trying to use date fields as part of my condition in a process builder to say:
If field #1 (number) has value > 0
AND field #2 (date) is less than 30 days ago (ie. date is within the last 30 ...
0
votes
2
answers
1k
views
Changed Date in flow
I have a Record - Triggered flow , and I need to make a condition on a custom field type Date , the condition is to verify if the date is modified make a another custom field is false and make this , ...
2
votes
1
answer
260
views
Does Date.addDays() method skip the weekends based on the Org's Business Hours settings?
For example when I use Date.addDays(1) for a task's due date. I realized if the next day falls into a weekend both Sat and Sun are skipped and it adds 1 workday (which is three days count). Now, this ...
-1
votes
1
answer
483
views
Unable to see last login or the login history for some users [closed]
when i go to Setup----> users-----> i could see the list of users.
I could not see the last login date for some users and also the login history for them. Can i know the reason for it.
0
votes
1
answer
85
views
Validate records by date ranges in SOQL and apex en bulk [duplicate]
I have a custom object with two dates - start and end. When inserting multiple records, I want to ensure they don't overlap at all. Naive implementation:
global with sharing class OverlapFilter_TDTM ...
0
votes
2
answers
98
views
Calculating the start of a new month in SF
So essentially what I'm looking for is to be able to calculate the start of a new month. So for context, there is a checkbox that I want to clear at the start of every new month (if it's ticked ofc). ...
0
votes
2
answers
726
views
Formula field date subtraction
I have a formula field as a boolean which should return true if the date of today and enddate has less than 3 months in between and the enddate field is not empty. I dont get the correct results. ...
0
votes
1
answer
6k
views
Format a date in a Flow?
I used in my flow a custom field of type date which returns to me in the email action a value of the date in the form of month Daye , Yers , what I want is to have the value of the date in the form DD/...
0
votes
1
answer
348
views
Date format in lightning-input after changed input value format
An issue in Date format validation in lightning-input type Date: After I changed the input value format according to the latest Salesforce updated ICU locale format for Ireland.
The last column shows ...
0
votes
1
answer
991
views
How to set Date field to Null or Blank using flows?
I am trying to set a date field to Null when there is a checkbox set for a record.
I have tried using Formula field of type Date and setting it to Null, using process builder global constant and tried ...
0
votes
1
answer
27
views
AMPScript convert "feb" to 02
I'm looking to convert a data field value (@OPT2) from "01-Feb-22" into "01-02-22" to be displayed on a landing page.
The reason is I want to display the date in French too and ...
0
votes
1
answer
623
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
41
views
How to Update List of Account in visualforcepage?
Iam new at salesforce, anf need your help and advice guys.
there is a list of account objec and I want to update PPDDate field (custom type date).
i can update several PPDDate at once then press the ...
0
votes
1
answer
233
views
String to Date in SQL
I have the following problem:
I imported a csv file in MC and there is a date field in it. When I create the billing_date attribute as text field, all of the csv data will be imported correctly and ...