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
1answer
28 views

Date calculation in formula

I have created a formula field Date__c. In this date field, I want to calculate the following: Renewal_Date__c + 1year + Extension__c The value entered in Extension__c is in months. So, I have the ...
0
votes
2answers
23 views

Formula Field to display 4 different dates (from different fields) in one field

Looking to create a formula field that will pull 4 different dates from 4 different fields and display in one field. I put the code below, but I'm getting an error. How can I fix it? Error: Error: ...
0
votes
1answer
29 views

Update date with date field in another table

I'm wanting to update the date field in one table with the date from another table. Below is an example snippet of what I'm trying to achieve. ln.[DateEntered] AS 'acc.[...
1
vote
1answer
376 views

Need to display the supported locale date format [duplicate]

Im trying to get a list of all the date formats salesforce expects for all the supported locales in my org. I already have the list of locales codes displayed on a visualforce page. I just need the ...
1
vote
1answer
42 views

Popup window to remind users to change event start/end dates

I want a reminder window to pop up in Salesforce after a user creates an event and clicks save. Sometimes users forget to change the event start times/dates so I want the reminder to just say ...
1
vote
1answer
6k views

SOQL Query - Get records where TODAY is between to Date Fields [closed]

I'm trying to make a query in salesforce that can evaluates Today's date between two dates. By "between" I mean that the current system date is >= From_Date__c and <= To_Date__c This is my ...
3
votes
2answers
294 views

Validation Rule to exclude business days

I have an existing validation Rule: AND( OR(Allocated_Date__c <= TODAY(), Allocated_Date__c = TODAY()+1 ), RecordType.DeveloperName = 'Control_Visit', ISPICKVAL(Status , 'Complete') ) ...
1
vote
1answer
78 views

How do I remove subtract symble in Formula Field?

I'm trying to remove the subtract symble from a formula field. This formula field is based on a two fields. one is date field value anthoer one is Text filed value. Is that a possibility? My scenario:...
0
votes
1answer
46 views

Date subtraction formula Field

I Want to display a value using formula field such it is a time ahead of created date and Recordactive text field based on status field values to Totaldays text field. If Status=active means Today()-(...
4
votes
1answer
87 views

Date in RFC2822 to Apex DateTime?

I'm getting some data from the Twilio API and one of the Date fields comes in this format "Wed, 19 Nov 2014 00:41:08 +0000" I've tried Date.parse('Wed, 19 Nov 2014 00:41:08 +0000'); DateTime....
0
votes
1answer
40 views

Custom Field Data type converting to DateTime in Apex Collection [closed]

I have a custom field with data type "Date" and when I run a query in the dev console the date returns as expected SELECT customfield_date__d from myobject 2017-10-03 When I query against the ...
3
votes
2answers
256 views

How would you use ampscript to determine the 1st Friday, 2nd Friday etc. of the month?

I'm trying to create dynamic content that varies depending on what week of the month it is, i.e. IF @Week == "first friday" THEN ... ELSEIF @Week =="second friday" THEN Is this possible with ...
0
votes
1answer
553 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
1answer
27 views

How to output following month? [closed]

I need to add the text for the following month in a newsletter. So for example in September to add the text for October.
0
votes
1answer
594 views

AMPscript Date Formating for French Language in HTML emails

This puts today’s date in my HTML email: %%=Format(Now(), "MMMM d, yyyy")=%% Any idea how to format this for FR? I've tried doing this and it doesn’t work: %%=Format(Now(), "MMMM d, yyyy","fr-CA")=...
10
votes
1answer
9k views

Does LAST_N_DAYS:1 Include TODAY?

I would like to ask about the definition of LAST_N_DAYS:n For the number n provided, starts 00:00:00 of the current day and continues for the past n days. Is CreatedDate = LAST_N_DAYS:1 equal ...
0
votes
2answers
1k views

Calculate No of working days difference between two dates?

This could be the very simple use case, but I am straggling to make this working. How we can find out the business working days difference between two dates ? I know 8/26/2017 is Saturday, next days ...
0
votes
1answer
1k views

Comparing datetime variable to null always gives false

I am trying to compare a datetime field with value to null even if I compare both of them it always gives false The code I am running Datetime a; Datetime yesterday = Datetime.now().addDays(-1); ...
0
votes
1answer
105 views

SOQL Query to compare dates on child object records

I need to run a query to compare dates on child objects. We have a custom object Job Placements (child of Contacts) with Start Date and End Date fields. I need to find all Job Placements where the ...
2
votes
2answers
1k views

CloseDate Using Apex

How Do i need to Write APex Code for the CloseDate on Opportunity object? Opportunity Opp= new Opportunity(); Opp.Name='Beginner'; Opp.CloseDate= ?????; Opp.StageName='Proposal'; ...
0
votes
2answers
86 views

Type Exception : DateTime

We have a custom object Yodlee_Accounts__c (Yodlee_Accounts__c) with a DateTime field (Yodlee_Last_Updated__c). I am trying to create a new record with value set in the field as below without success....
0
votes
1answer
356 views

All Day Events in a lightning component

I'm building an events component that shows events based on a dropdown for Today, Tomorrow, This Week, and Next Week. But, I'm running into an issue with all day events. I'm basing a query off of ...
1
vote
1answer
845 views

JSON_PARSER_ERROR: Cannot deserialize instance of date from VALUE_STRING [duplicate]

I am trying to insert date from csv file into Salesforce (Sandbox for now). I have a csv file that has this format YYYY-MM-DD hh:mm:ss. Bottom is screenshot from a csv file. I tried inserting into ...
0
votes
1answer
19 views

Derive Month of a Date Field to group by in Standard Summary Report

I want to derive the month of a date field called MeetingDate__c. Purpose of this is to display all Meeting Records grouped by the derived month. I have created a formula field to derive the month ...
1
vote
1answer
3k views

How to pass Date as parameter?

I am trying to create new opportunity passing 3 arguments into a method. how do I pass date since it is one of three required fields? Below is what I have at the moment. public static void ...
1
vote
1answer
595 views

Change Date Format inside label

I want to edit the date format inside the label from YYYY-MM-DD to MM/DD/YYYY <ui:inputSelectOption text="{!event.Id}" label="{!event.Name + ' - ' + event.Event_Start_Date__c}" class="eventList" /&...
0
votes
1answer
145 views

Creating a query based on creation date

I am trying to figure out how to create a query based on creation date. I tried the following: select s.emailaddress , s.subscriberkey , s.status , s.datejoined from _subscribers s where s.dateJoined ...
0
votes
2answers
1k views

Convert String to Date in Apex and calculate the days difference

I have two String dates in apex and I want to calculate the difference in days in salesforce. I was trying with the below code, but it was giving me Line: 4, Column: 1 System.TypeException: Invalid ...
1
vote
2answers
1k views

To set a Blank date in a Apex formula

I have a simple formula date field which I want to return a BLANK DATE (not a NULL) if the criteria is false. I tried many syntax, but all failed
0
votes
1answer
19 views

Inconsistency of data when seen on VF Page and Sites in Date Format

The Date format when we are seeing the data in VF page is DD/MM/YYYY and when same is viewed from the sites the format is MM/DD/YYYY. Below is the code snip. <apex:repeat value="{!wrpPhaseList}" ...
0
votes
1answer
318 views

Subtracting months in Process Builder

I have a date field (datefield__c) that i want to subtract 11 months. How can I do this using formula in Process builder? I tried to use the below code: DATE(YEAR(datefield__c), MONTH(datefield__c) - ...
0
votes
1answer
451 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
2answers
181 views

Exporting a data extension messes up the date format

I'm trying to export a Data Extension via a browser download. It is not a large data extension - around 2,000 records. When I open up the exported file (a csv file), I get a mixture of two date ...
0
votes
1answer
113 views

Creating unique records based on field values

There are 2 objects say, Object1 and Object2 both having 2 fields each, say City(Text) and BatchDate(Date). Object1 records get created through integration with external system and Object2 records get ...
-2
votes
3answers
437 views

Show records from tomorrow and within 30 days using ampscript

I have 2 DE, Meeting and subscriber. I want to show records dynamically in email I used LookupOrderedRows() to fetch records, now i want to show only 1st record (meeting), which starts from tomorrow ...
1
vote
1answer
253 views

Date Formula - Want a Start to End Date Formula Field

I want to have a formula field that displayes the Start Date of an event to the End Date of an event, i.e (01/01/2017 - 31/12/17) - Like this But when I try to make it like this I can't as the dash ...
0
votes
1answer
97 views

Retrieve date from from date-time datatype?

Hi I want to get only date value from CreatedDate Example: select id,name,createdDate from Account where DAY_IN_MONTH(createdDate) =: 12 Which retrieves account created on date 12. How to achieve ...
0
votes
1answer
32 views

Operation betwenn two date / datetime

In a condition, I had to make a substraction between two datetime and check how many days a separating the two datetime like that : if(datetime2 - datetime2 > 5){ //do something } Of course ...
1
vote
1answer
105 views

How do I localize a date field in an SOQL query?

Per the docs on the FORMAT() function, I can localize numeric, datetime, and currency fields in an SOQL query by wrapping the field name in FORMAT(). This does not work for date fields; I either get ...
0
votes
2answers
141 views

Workflow rule based on Account custom Date field not firing

I created my WFR on the Contact object. "Arrival__c" is an Account custom date field that should trigger an email alert to all Contacts of said account on the arrival date. There is also a picklist ...
1
vote
1answer
444 views

SAQL - When I dynamically create dates in SAQL and group them, I can't use the “Timeline” chart

I try to create a timeline chart for every year for products on the market that are started to sell before that year and ended to sell after that year. To get my filtered data I filter them like I ...
0
votes
1answer
60 views

How to make a date formula which calculates booking date + current month + 3 months(90 days) in salesforce

Example: If Booking date is -> 7 June 2017, I want the formula to calculate the current month (June) + 3 months(90 days), and the formula should return 29th September 2017 Calculating as ...
1
vote
2answers
664 views

Workflow field update on date field to add 10 years

I am not too good with formulas but i have a workflow and i need to create a formula on my field update that will update my custom field "End Date" 10 years ahead in the future.
1
vote
2answers
733 views

Why does it say “DateTime does not exist”?

Apex Code public class TaskTriggerHelper { public TaskTriggerHelper(){ } public static void createTask(list<Task> tskList){ list<task> listOfTask = new list<task>(); ...
-3
votes
1answer
619 views

Issue with date in Apex Maps [closed]

I am populating a map indexed by enddate. When I print the date property in apex before storing the map as key it prints yyyy:MM:DD 00:00:00. When I store it in the map it only print yyyy:MM:DD. ...
0
votes
1answer
49 views

Expiry date of source org?

I signed up for two developer editions about three months ago and today I received the notification that it is about to expire. Is there a process where I can see the actual date?
4
votes
1answer
93 views

Why does the value in my formula field value in the UI differ from value returned from SOQL on the same Opportunity Line Item?

I have two custom fields: IsCurrentFormula__c, a formula field that evaluates whether or not today's date falls between an Opportunity Line Item's effective and end date (eg. within a range of dates)....
1
vote
3answers
7k 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....
1
vote
1answer
1k views

How to change date format depends on user locale?

I want to change date format depends on logged in user locale. Date start_date = 2017-25-11; If user is from China, start_date should display as: 2017-25-11 If user from US, start_date should ...
1
vote
0answers
81 views

For date field type in salesforce wave analytics, internally many sub fields for date gets added. What can i do to get only the field that i provide?

For example i have a date type field as ClosedDate in the external CSV file that i need to upload to create a dataset, when i try to see the fields, internally many sub fields gets added as follows: ...