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
vote
1answer
352 views

How to create an Automation Studio exclusion AMPScript to filter the users of the last hour?

I would like to send an email to the users of my Exact Target list after a certain amount of time. In order to do this, I set up a workflow in Automation Studio with a Send Email task. Inside the ...
0
votes
1answer
15 views

Date based entry event not working

I've set-up a data based entry event as can be seen in the picture. When I run a similar query it gives me the people who have their birthday today. But the entry event is not doing anything, it is ...
1
vote
2answers
55 views

Converting Datetime to Date returns date in the past

Datetime conversion of a custom datetime field to a date value doesn't work correctly. This behavior isn't explained in Salesforce's documentation as far as I know. Set your org & user to Pacific ...
0
votes
1answer
393 views

lwc convert date from text to lightning-input of type date

I have a component which is displayed in a custom data table column for a text field having date value. By default text value dueDate along with Edit icon gets displayed. When the edit icon gets ...
1
vote
1answer
24 views

How to filter on CreatedDate using a date range in SOQL?

I'm having problems trying to filter a query by CreatedDate using a date range. The query returns always a wrong set of records. For example, if I want to get all records created until 2020-07-28, it ...
0
votes
3answers
785 views

Show dynamic content block based on date and last update

I have created a dynamic content block, which is meant to be added to our email template. It is a top banner, which should only be shown if a customer have made updates to their basket within the last ...
0
votes
2answers
27 views

Display Month Name and Year based from Date field eg: September 2021

Any assistance would be much appreciated! Looking to build a formula field that extracts Month and Year of a custom date field. (if it is 28.09.2020 as the date then the formula field would display ...
0
votes
1answer
18 views

How to remove the time 00:00:00 from a date format and still maintain the date type

PROBLEM: I converted a string to Date format. Eg: String dateToParse = year+'-'+month1+'-'+day; Date ds = Date.parse(dateToParse); OUTPUT: 2020-07-24 00:00:00 (output is a Date type variable) Expected:...
1
vote
2answers
49 views

How to format a date in a javascript?possible [closed]

How can I format a date object to print as today instead of showing a numeric date in a javascript? I'd like to display it like this: today At 5:00 PM. js var today = new Date(); var date = new Date(...
0
votes
0answers
17 views

How to Blank Date value in Date formula field?

This field is to display the "date" value when this Opportunity's Stage value contains "Closed ". and at the same time Opportunity's Stage value not contains Closed means this ...
0
votes
1answer
21 views

How to format date field to ISO 8601 format?

I need to have a Date field send in an apex API callout in the format that matches this format "2019-05-28T19:40:36+00:00" I currently have the following: Datetime startDate = datetime....
1
vote
2answers
30 views

Salesforce date format

The system I'm importing data from has a date format that looks like this: 8/8/2019 5:58:23 PM. Unfortunately there is no way to change this format with other software and it is not recognized as a ...
0
votes
1answer
12 views

Convert date field to ISO 8601 format in REST API Post Callout

The external site that I'm trying to send Salesforce data to, requires that all dates/datetimes must be in ISO 8601 format. I am curious about how to accomplish this within my Apex class. The field ...
0
votes
1answer
9 views

Given the week number, how to find the start date of that particular week?

Given the week number, how to find the start date of that particular week using a Formula Field?
1
vote
0answers
32 views

lightning input type = date, max attribute behaviour not similar in production and lower enviornment

I used max attribute of lightning input type date to disable the future dates in date picker. It was working in lower environments, but not working in production. In Lower Environments: It shows the ...
0
votes
1answer
36 views

Call a toast event in the Lightning Web Component date selector

Hi I have req where user select the date after the maximum date then i need to show the error toast message in saledforce LWC , can anyone help me out for the req. Below is the code let today = new ...
0
votes
1answer
396 views

Calculate time difference between two date time fields

I have a process builder by which I am calculating the time difference between NOW() and another Case object date field. My formula goes like this Time_Spent__c = NOW() - Start_Time__c However ...
0
votes
1answer
17 views

add Datetime values inside IN query clause in a different context

I am trying to create a query dynamically which contains the Date and Datetime values with IN clause with WHERE For example, SELECT Id FROM Opportunity WHERE Program__c IN ('Online','On Campus') AND ...
0
votes
0answers
47 views

System.now() gives different value than expected?

For example if DateTime is : DateTime dt= Datetime.newInstance(2020,07,12,18,30,0); //using System.now() for dt DateTime.newInstanceGmt(dt.date().addDays(-5),Time.newInstance(00,00,01,00)) ;// should ...
0
votes
2answers
639 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}"/> <...
0
votes
1answer
609 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
1answer
12 views

How to put filter in report for dynamic last month?

I am trying to filter out records in my salesforce report like i just want to see last month records (Created Date). See below what i have done so far, Date filter on Created Date > CUSTOM > 02-...
0
votes
0answers
31 views

Reset invalid value in lightning-input date to a blank value on click of a button

I have a lightning-input of type date. When I enter an invalid value in this field, there is a validation displayed 'Your entry does not match the allowed format MMM d, yyyy.' I want to clear this ...
0
votes
1answer
397 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) - ...
2
votes
1answer
128 views

Dates appearing one day before the actual date

I am displaying a Lead list using a datatable inside a aura:component. This is the table i am displaying: I am developing this app from India. And, when the client opens the same app from USA, this ...
48
votes
8answers
36k views

How Can I Tell the Day of the Week of a Date?

I'd like to build in some logic based on the weekday (e.g. Monday, Tuesday, Wednesday) of a given date. How can I identify the date, using either formulas or Apex code?
0
votes
1answer
17 views

Format String Visualforce Component in a Custom Visualforce Template

I am struggling with something I think should not be difficult but I am not able to figure out, my date field display as the below screenshot. My aim is to remove from the template the characters 00:...
0
votes
1answer
38 views

How to dynamically change the start time in the query body of REST API

I am doing a REST API call using POST method with [SSJS]. In the body of the API i am sending the following parameters. var start= { "activityTypes": [ "Wait" ], "start": "2020-...
8
votes
2answers
19k views

How To Format Datetime like 2017-01-10T14:53:55.000+0000?

Using Apex, how can I format a Datetime variable the same way it is displayed in SOQL result? It seems that SOQL uses the UTC format. When I run the following query SELECT CreatedDate FROM Account ...
0
votes
1answer
79 views

How to convert date to yyyy-mm-dd format using ssjs without timestamp

I am trying to convert the date to YYYY-MM-DD format using SSJS. But not able to do that. Getting NAN. var day = new Date(); var prevDate = new Date(); yesDate.setDate(day.getDate()-1); var test = (...
0
votes
1answer
414 views

<lightning:input type=“date” validation

I need to put a validation on lightning input field date. It is a date of birth field and it should not accept date beyond system.today(). Basically the validation will be date_Of_birth > Today() , ...
0
votes
1answer
61 views

How to use long date format in LWC

So I've been trying to understand the use of dateTime.longDateFormat in the documentation located here: [https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_i18n][1]...
0
votes
1answer
831 views

How to check format of date in If condition & Convert that format to sfdc system format?

I am importing records from Data loader and there is date format in csv is : 27.08.2016 04:40:19 & Salesforce Does not support this format as it has English(United State) locale.. so, i am ...
0
votes
1answer
38 views

How to identify the % of time between two dates + how to find records between two dates using SQL [closed]

Relating to my question related to finding a date X% between two dates using SQL, I'm having a challenge resolving two other similar things: How to identify the % of time between two dates. Here's ...
0
votes
0answers
12 views

I need an “always up to date” ARR value in my accounts, based on opportunity values and dates

Hello Salesforce people, I have something I am trying to do in Salesforce, and I am coming up on a lot of limitations within the platform, and I wanted to ask the best way to do what I am trying to ...
2
votes
2answers
150 views

AMPScript displaying wrong Date inside Journey that is triggered by automation - Reason?

The Problem A wrong date gets calculated by AMPScript GetSendDate with SystemDateToLocalDate inside a journey that is triggered by automations. Our SendLog DataExtensions has senddates displayed in ...
-1
votes
1answer
19 views

Date format to MM.DD.YYYY

I'm trying to convert my datetime value into MM.DD.YYYY format Tried the following, 1. datetime dt = system.today(); string f = DateTime.newInstance( dt.year(), dt.month(), dt.day() )....
1
vote
1answer
42 views

Apex Date to string

I'm trying to display the Start date Concatenated with the End Date. To achieve this I've converted my date field to string and concatenating the string value. It works fine but in both start date ...
0
votes
1answer
19 views

Control going inside 'If' block even when it should not (only for 1 value)

I am trying to count the number of weekdays (Monday - Friday) by taking the number of days since 01-07-1900 (7th January, 1900), for a given date, and checking the modulus by 7. For modulus values 0 - ...
0
votes
1answer
29 views

Why does dateGmt() function contains a Time quotient at all?

Long startTime = 1112222220; Date startDate = DateTime.newInstance(Long.valueOf(startTime)).dateGmt(); system.debug('startDate: '+startDate); String qry = 'Select Id, Subject from Task where ...
2
votes
2answers
978 views

DatePicker Issue

I have two text field: One normal text field that accepts numbers. <apex:inputField value="{!FinancialAssCont.Down_Payment__c}" styleClass="form-control downpaymentAmount" onblur="...
0
votes
1answer
39 views

THIS_QUARTER is breaking SOQL query

I have a very bizarre issue with a batch job that is using the following query as a scope to generate new records Select id, Management_Fee__c, Payment_Schedule_Comments__c, ...
4
votes
2answers
1k views

Storing 'date' attribute for ExactTarget subscribers

I've been trying to store 'Date' via API, but somehow it doesnt work I have created new field in profile management, called 'prospect_date' If I create new subscriber, pass all attributes via API ...
1
vote
4answers
2k views

Formula Question: Record a date of first activity on contact object

I need to create a custom field on my Contact object that records the date of the very first call that has happened with a Contact record. I thought about creating a formula field on Contact, and ...
3
votes
1answer
278 views

Max attribute is not working properly for input type date

Hi Currently I am facing issues in the "Max" attribute in lightning-input but max attribute is not working properly in some cases. My requirement is to disable dates after One year of the Current ...
0
votes
1answer
76 views

ValidationError (Invalid Date) when importing a CSV to a Data Extension with a Date type field

I have extracted the _open Data View from an old instance and tried to import the 139K CSV records into a Data Extension in the new instance. However, I got a problem with the "EventDate" field when ...
1
vote
3answers
1k views

Merge Date & Time field in to datetime field using formula field

We have to separate fields to pick appointment date & appointment time in Custom object. Now we have to filter out appointments between two dates (w/ time), so I need to compare appointment date &...
9
votes
3answers
46k views

How to set a Date in apex test class?

I have written a test class in which I just want to set one date field. How can I achieve this? I am not able to set the value using the following code: Account acc=new Account(); acc....
0
votes
1answer
1k views

how to remove the time stamp in a date field in an email template

When trying to use date field in template. Date is displayed as 'Wed Nov 09 00:00:00 GMT 2016' but I want the output as 'Nov 09 '. Please help me out.
0
votes
0answers
6 views

Import English (UK) dates into Marketing Cloud

I am trying to import a CSV with a bunch of customer information into Marketing Cloud. The import keeps failing due to Invalid Date: 7. I've been using English (United Kingdom) as the date format ...

1
2 3 4 5
12