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
-1 votes
1 answer
39 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,473
-1 votes
0 answers
25 views

IsDate Function in SOQL

I am importing data from the Account table and I can see that there's some bad data in the field: Contract_Effective_Date__c I am hoping to modify the source query to only return records from the ...
1 vote
1 answer
41 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
25 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
35 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
113 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 ...
  • 313
0 votes
2 answers
123 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 ...
  • 4,591
0 votes
1 answer
193 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
51 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 ...
  • 3,711
1 vote
1 answer
137 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
21 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 ...
  • 1
0 votes
1 answer
21 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 ...
0 votes
0 answers
140 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 ...
  • 1
0 votes
2 answers
405 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
98 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 ...
  • 650
-1 votes
1 answer
204 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.
  • 1
0 votes
1 answer
54 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 ...
  • 4,578
0 votes
2 answers
47 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
135 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. ...
  • 2,206
0 votes
1 answer
2k 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
126 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
427 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 ...
  • 1
0 votes
1 answer
25 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
236 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
32 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
71 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 ...
  • 1
0 votes
1 answer
27 views

condition form not Leap Year issues

I want to express this condition with my formula taking into consideration the date of 02/29 End date >= Current date + 365 then green End date between Today's date + 1 and Today's date + 364 then ...
-1 votes
1 answer
167 views

Formula condition with date

I have this formula type field, the condition is correct but the problem I have is that when it is 02/29 as the end date, my field gives me an error, is that because I I used yers -1 maybe, if not, do ...
0 votes
1 answer
537 views

Compare date in lightning web component

I want to compare my two dates, start date with end date, if start date >= end date so I can save if not I can't save, the problem I have is that in the console I get only the value of the end date ...
0 votes
0 answers
113 views

How to obtain translated full day name from date in Apex?

In Apex, the name of the day can be derived from a date using the format('EEEE') method: Datetime targetDate = Datetime.newInstance(2022, 4, 28, 0, 0, 0); String dayOfWeek = targetDate.format('EEEE'); ...
  • 3,595
0 votes
1 answer
81 views

Date.addDays not working in a loop

I have this code that creates opportunities for every day given a period start and end date. However I see that the addDays is not working as the resulting value is the same as the start date. Why ...
  • 321
1 vote
1 answer
39 views

Trigger on difference between 2 date fields - not working

I'm a beginner in APEX and I'm trying to develop a trigger on Service Appointment that will auto populate the Work Duration field with the difference between the Schedule End date and Schedule Start ...
0 votes
1 answer
159 views

Close a case X days from its opening - Salesforce

What I am trying to do is that when a new case is created, if it does not advance from the new status, it will be closed in 14 days from the date of creation. [ [ [ [ I have this trigger-flow but it ...
  • 3
0 votes
2 answers
457 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....
  • 27
0 votes
1 answer
33 views

Aura Component get time from Server as opposed to JavaScript/Client Side/Browser Time?

We have an intake form built using Aura Components and its a simple form. The submit button on the aura component is enabled or disabled depending on what time it is. Basically, they are not allowed ...
  • 392
-3 votes
1 answer
86 views

Date formatting not working in Apex

I am trying to convert the date in a date field to different time zones using format method. But it is not getting converted. Below is the sample code. Account acc = [select id, custom_date__c from ...
0 votes
0 answers
51 views

Convert function with date formatted as text

I have a DE1 with field named 'DATE_A' with datatype text. This field contains records that are formatted like this: yyyy-mm-dd hh:mm. Using sql query activity I should retrieve records with field ...
  • 71
-1 votes
1 answer
668 views

Report with a Date Range?

Is it possible to create an opportunity report that reviews opportunities by a date range field (like January-February) instead of a singular date field (like "Created Date")?
0 votes
0 answers
27 views

How to best track opportunities by their products' "active" dates for a report?

Simply stated, my goal is to write an accrual report that lists all closed/won opportunities by each month (with each month including in an opportunity only if any of its products are active during ...
2 votes
2 answers
750 views

Date in LWC - Year field shows extra values

When the user selects a year for Date, an alphanumeric value appears next to the year. Does anyone know how to remove this extra alphanumeric value? any help is greatly appreciated! This is a custom ...
1 vote
0 answers
117 views

How Can Dates From an Org and a User's Personal Machine be Reliably Compared to One Another (LWC)?

I have had some trouble comparing dates retrieved from an org and using them in a Lightning Web Component in order to tell whether or not a certain record has 'expired' in order to display said ...
0 votes
0 answers
87 views

Use DATEVALUE in formula on REFERENCED date/time field

I have the following formula on the case object: TODAY () - DATEVALUE(Object2__r.LastModifiedDate) But after I insert this field on the report nothing shows (I want show the day difference between ...
  • 335
-3 votes
1 answer
188 views

How to convert string in Date format? [closed]

I have a string like this : '20170206' I need to convert it into a date like that : 06/02/2017 String birthdayDate = '20170206'; Date dt = Date.parse( birthdayDate); system.debug(' Parsed Date is ...
0 votes
0 answers
90 views

How to formate date picklist in lightning-datatable to 24 hours format

I have datatable column with type="date" which display hours/minutes/seconds in 24 hours format, like this: recordTime: { label: this.labels.recordTime, fieldName: '...
  • 15
4 votes
2 answers
2k views

Set default value to Date input in lwc

I am trying to set a default value to the date input field in the lightning record edit form (Today + 90 days). I have done the below code but it is not recognized in MMM d, yyyy format. var someDate =...
  • 325
0 votes
1 answer
114 views

How to get only last two character from current and next year date in aura controller js

I have used the below code to get current and next year but it's coming as 2021 and 2022 but I only want 21 and 22 from the below code. Please suggest. var today = new Date(); var currentyyyy = today....
1 vote
2 answers
947 views

How to correctly convert Unix Timestamp to datetime in SQL

I'm trying to get the date format dd/MM/YYYY or anything readable. actually I have the date data with this format stocked in a string field "1620305130000" I have tried the following CONVERT(...
  • 49
0 votes
1 answer
401 views

Salesforce formula to get last day of previous month after one year

I have validation rule which will throw if the selected date is not last day of previous month after one year Example - today is Oct 1,2021 then my validation should fire if selected date is not Sept ...
0 votes
2 answers
143 views

How can I make a year in a SOQL query variable?

So I can run a query such as WHERE Date__c > 2020-07-31 but then next year "2020" would be out of date. I'd like "2020" to be variable so that next year, when I run this again, ...
  • 13
0 votes
1 answer
59 views

JavaScript setHours is setting less hours than specified by parameter

function removeDaysToDate(date, hours){ var res = new Date(date); console.log('res ->' + res); console.log('hours ->' + hours); ...
  • 185

1
2 3 4 5
14