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
332 views

How to filter a objectlist in javascript by date

I have lightning controller in were I want to filter a list based on a datefield. I tried the following but end up with an empty list: My list has 2 records: serverList[0].Startdatum__c = 1-12-2018 ...
2
votes
1answer
148 views

Why do I get a Parse error on date field

I have the following simple query but i am getting a parsing query error, any ideas? SELECT startDate__c FROM invoice__c WHERE startDate__c.month() = 3 startDate__c is a date field. No errors if i ...
6
votes
3answers
15k views

Lightning:input type=“date”: how to change the date fomat - Summer'18

I'm trying to change date format of this component but I dont find any attribute (like ui:inputDate has) to change the date format. <lightning:input type="date" name="input8" label="Dates" value="...
0
votes
1answer
579 views

<apex:input type=“date” /> Not displaying date picker in Internet Explorer

<apex:input type="date" styleClass="input-text-center" value="{! data.offerDate }" rendered="{! IF( AND( data.isField = true, data.isDateField = true ) , ...
1
vote
1answer
30 views

Comparing Dates - Date.ValueOf() seems to not output correctly - returns 01:00:00

Maybe I'm misunderstanding Date.ValueOf() - but I'm not expecting this behavior... I'm was thinking the dates would be the same. List<Limits__c> mostRecentBatch= [select id, lastModifiedDate ...
0
votes
2answers
746 views

Difference between two dates and add business days?

I have two dates, Created date and date processed. I want to find the midway between these two days but make sure the midway date lands on a business day. DATEVALUE(createdDate) + (( ...
1
vote
2answers
311 views

Convert String into formated date

I have a string like this : 10/12/1990 that is supposed to be a date. I need to convert it into a date like that : 1990-12-10 How can I do that ? I tried a lot of things like converting it ...
0
votes
1answer
23 views

identify the last 2 weeks of the last quarter month

I do not want the user to save the CloseDate as the last 2 weeks of the last quarter month. for ex. March 16-31 / June 16-30 / Sept 16-30 / Dec 16-31 Currently I am trying to use a validation rule ...
-1
votes
1answer
65 views

Validation rule getting quarterly months

I am trying to get only the months March,June,September,December. Not sure why this isn't working, I use Ceiling which gives the rounded estimate. OR( CloseDate = DATE(YEAR(TODAY()), CEILING(MONTH(...
0
votes
1answer
18 views

Validation rule Not working properly

My validation rule, I am playing around. Should activate only when June 15/2018 or June 16 2018. But it activates for any date. Not sure why. OR(ISPICKVAL( StageName , "1 - Prospect"), ISPICKVAL( ...
0
votes
0answers
28 views

Dynamic Word in SMS [duplicate]

I will need to send a SMS for the first time and I will need to have on it one dynamic word, a date. I'm using AMPScript to do that but all my tentatives fail. e.g See more information on %%[ SET @...
2
votes
1answer
1k 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
2answers
662 views

Is there a way in process builder to check if a date is set and if so, if it is greater than something?

I am trying to implement some form of attribution, where there are two cases: Date has not been set (i.e. this is the first opportunity) Date has been set (i.e. this is not the first opportunity) ...
0
votes
1answer
160 views

Get previous month date to string no day

New to salesforce and apex, was wondering if there was a good way to get a date in this format: "201804" would be what the function would return currently. Essentially the date last month without ...
1
vote
1answer
518 views

Null check for Date field on VF Page

How do I check if a Date field is null? Below is the code: <apex:outputText label="Date:" value="{0, date, MM/ dd/ yyyy}" style="text-align:center;" > <apex:param value="{!care....
0
votes
2answers
620 views

Remove time stamp from the date

I want assign a date value into a WHERE clause of query This is my date Date myDate = System.Today().AddDays(Integer.valueOf(Deal_Expiration_Batch_Settings__c.getInstance()....
0
votes
0answers
23 views

Order by if data is same for a field

In visualforce page which use apex:repeat, and also for client side sorting uses datatable.js. A field column with date type is shown. Also the page allows inline editing, on successful edit it will ...
3
votes
1answer
676 views

Invalid Date Format for CloseDate with simple salesforce

I'm encountering some issues when attempting to create an opportunity using the python library simple salesforce. I've verified that CloseDate is a Date Type field. With the simple salesforce ...
0
votes
1answer
119 views

Formula - Multiply Date Field by Picklist value (Number of Weeks) - Needs to be editable

Trying to create in Process Builder. When a Lead Time is selected from a picklist then The Contract_Date__c is populated with Order Received Date * Lead Time So if you have a Contract Date of today ...
0
votes
1answer
197 views

Date parsing issue - Invalid date

The visualforce page uses a date picker which should show data only on dd/MM/yyyy format. When selecting the date and clicking save button, the date string is parsed using Date.parse and the date is ...
2
votes
1answer
1k views

Format date as two digit month and day

How do you set the .format() method to create a two digit month and day? I have tried this myDate.Format('dd/MM/YYYY') The .format() method has no example of this on the support page. https://...
5
votes
1answer
377 views

Apex - Getting list of dates in month - CPU timeout

I am getting a CPU timeout from my loop. I have checked the debug logs and my start and end dates have the correct dates in them. I have tried setting the condition to be dtoday.adddays(3) just as a ...
4
votes
2answers
2k views

Convert the any locale date format to US date format in Javascript lightning

I have been struggling to change the date format to US locale time. I tried so many methods but if fails at some or other scenario. The issue is I cannot say which Locale the client will be using. ...
5
votes
1answer
1k views

What are the minimum and maximum valid dates in Salesforce?

What are the minimum and maximum valid dates in Salesforce? What is the valid date range in Apex, SOQL or SOAP API? It is hard to find anything in the documentation
-2
votes
1answer
1k views

Report: Last Activity date 30, 60 day

I'm trying to run a report and group them by 30, 60, 90 days last activity date. Do I filter by 30, 60, 90 day or how should i do this?
0
votes
1answer
256 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
1
vote
0answers
158 views

How to Calculate the CreatedDate Day of the Week In Process Builder

I've been trying to determine in process builder what date of the week the created date is but I keep getting an invalid formula error without details on what is incorrect. If I try either of the ...
0
votes
1answer
183 views

Same start and end date

For a custom object, I have two date fields : start date and end date. I want to make sure the end date is greater than start date. As per https://help.salesforce.com/articleView?id=...
6
votes
1answer
273 views

Test.setCreatedDate not working in SOQL Query with condition date set in future

I have an issue with Querying a record in a unit test with a custom set createdDate using the method Test.setCreatedDate(); static testMethod void test() { Account a = new Account(name='myAccount'...
1
vote
1answer
353 views

Can we convert Picklist value into Date format?

I have picklist which has date values like 01/01/2016,01/02/2016 ..... I need to Map this picklist value to One formula(date) field. I have tried with Datevalue(TEXT(picklist_c)) in the formula field,...
-2
votes
1answer
5k views

How to convert Datetime datatype to Date format only?

How to convert datetime field to date field? Hi All, This is custom field of datatype : LightiningEd__Stage_change_from_Prospecting__c (Date) but Closeddate is ...
0
votes
0answers
248 views

Date Format: Apex Callout (Soap webservice)

We are performing an apex callout from Salesforce to a SOAP based webservice and it requires us to pass a date in the following format: MM/DD/YYYY (note: this should be date datatype). When I am ...
0
votes
1answer
431 views

Old style JOIN (ANSI JOINs) syntax is not allowed. Split DATE

I'm using a simple SQL query to get DAY, MONTH, YEAR out of a Date field (BIRTH_DATE) in Automation Studio (of marketing cloud). SELECT CUST_CODE , EXCLUDED_FROM_NPS , BIRTH_DATE , DATEPART(DD,...
0
votes
1answer
29 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
27 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
430 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
46 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 ...
0
votes
1answer
9k 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
359 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
100 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
49 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
111 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
45 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
277 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
2answers
594 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
746 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")=...
13
votes
1answer
12k 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
2k 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 ...

1 2 3 4 5 11