Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
2
votes
1answer
4k views

Query Activity in ExactTarget - getting date out of datetime

Using ExactTarget queries to retrieve data, i found that the regular 'Date' function that should extract only the date, without time from a column, is not working. Is there any workaround or something ...
0
votes
2answers
1k views

Number of holidays between two dates

Any idea of how to calculate the number of holidays between two given dates? Object: Time_Off__c Fields: Start_date__c, End_date__c , Included_Holidays__c presenting the number of holidays between ...
1
vote
1answer
50 views

Custom CloseDate returns a double and when i convert it back to a date it is the wrong date using Javascript

I created a JS button that creates an Opportunity and it populates certain fields with data from another Object (custom object called Deals). All the fields are working as they should except for ...
1
vote
1answer
523 views

DateTime stored in salesforce at GMT -03:30 or at GMT +0

i have a custom object i stored startdatetime__c and enddatetime__c field.during storing i stored 4/28/2014 8:00 AM as startdatetime__c and enddatetime__c at 4/28/2014 4:00 PM but when i try to ...
7
votes
1answer
22k views

Convert DateTime to Date

I want to Convert DateTime into Date I have been trying this out ..below is the code snippet public void searchSFDC() { DateTime lastModDate ; for(sObject resultSet : searchResults[0]) { // ...
2
votes
1answer
119 views

Need to populate an email referencing the latest data in a data extension

I'd like to insert content based on a user's last entry within a Data Extension; that is, if a user looked at five products over five days, I want to use the most recent product to insert content. ...
2
votes
3answers
3k views

Excluding weekend and holidays from my days number

I want to retreive the weekend and holidays from my days number! I've created a formula field named weekend where I put : CASE(MOD( Start_date__c - DATE(1985,6,24),7), 0 , CASE( MOD( End_date__c - ...
3
votes
1answer
968 views

Manipulating the date/time field

I have a problem in manipulating my date/time fields, here is the problem: I have two date/time field for my time_off__c custom object: Start_date__c, End_date__c and a formula field number type ...
1
vote
1answer
138 views

TIME display issues

I am using Startdatetime_c custom field as a Date/Time data type, when am inserting a record in salesforce as Startdatetime_c = 26/03/2014 10:00.This record is inserting as per my request, but when ...
4
votes
2answers
5k views

Fetching the TIMEVALUE from Date/Time datatype

My Scenario is, I am having two fields as Startdatetime_c(date/time) & LastDatetime(date/time). Here another one field Nextdatetime_c(date/time Formula field) i want the Date from LastDatetime_c(...
0
votes
1answer
4k views

Using Date in SOQL to get only records created on a certain date

I'm using this soql query in my webservice to query for records created within specific dates and using this as an if condition of the dates are the same if(fromDate == toDate){ orderList = ...
11
votes
4answers
2k views

Datepicker widget location issue

I have a visualforce page with a standard controller of a custom object, and within the page and inputfield that is tied to a custom date field of said object. I've dropped the VF page into the page ...
4
votes
1answer
2k views

SOQL: converting Date functions return values to specific timezone

SOQL Date functions CALENDAR_YEAR and CALENDAR_MONTH return values as UTC Timezone values. How to convert those values to specific Timezone, like Europe/Berlin ? Example time: 2014.07.01 00:00 , ...
0
votes
1answer
736 views

Date insert into sfdc in soap integration

I am working on SOAP integration i am getting the date format from third party is 'yyyy-mm-dd' i want to insert this format into salesforce. my webservice is accepting this format 'dd-mm-yyyy'.. ...
1
vote
1answer
493 views

How can retrieve the date value of the opportunity history record in reporting?

Is there a way to return the date (and time) of the opportunity history record, i.e., when it was saved/created? I am currently unable to build a report of opportunities that have moved to a certain ...
0
votes
2answers
1k views

Changing date format

I am inserting one record to Custom_object__c that object contains the DateTime field,here am a russian user to insert.If i use a date format as "Startdate:22.02.2014"(JSON request) means its accept, ...
2
votes
1answer
803 views

Enterprise WSDL, fields that are Date in SF, came over as Calendar in Java object classes

I used WSC-23.jar to convert enterprise WSDL file into a JAR. While the WSDL file had the Date fields/elements correctly marked with the type="xsd:date", generated Java classes for the SF objects ...
0
votes
3answers
2k views

Convert json string of datetime to a date

I have the following value coming through from a json payload, I need to convert it to a date value in Salesforce. The json body contains this: "ExpiryDate":"/Date(1617145200000+0100)/" When I ...
15
votes
3answers
19k views

Apex: getting yesterday's date

I know that you get today's date like this: Date.today(). What would be the best solution to get yesterday's date?
6
votes
1answer
1k views

Salesforce Dates Incorrectly Formatting

So I have an interesting issue with dates. Basically the format method for the month of December seems to be broken for 2014 and 2015. Running the following code for the years of 2015 and below fails ...
4
votes
3answers
3k views

date/time - date conversion problem

I'm passing a date/time field as a parameter to a page like this: &startDate={!object.Start_date__c} Start_date__c in object is a Date/Time field. But when I open the link I get this error: ...
4
votes
2answers
868 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 ...
5
votes
1answer
436 views

Why is the inconsistency with Close Month?

I have created a report that gives the closed opptys of previous years. When trying to understand, I get a wrong: Summarize by Close Month option, as it shows the last month of 2012 as the close ...
0
votes
1answer
5k views

Convert datetime to date in SOQL query [duplicate]

I have an Object (aObject) contains datetime field, I want to get all data from aObject where datetime includes 12-29-2013 ignoring the time. any idea ?
1
vote
1answer
2k views

Date comparison issue

I am implementing date functionality where i want to get records date within last 4th calender quarter.How can i achieve this in SOQL? I have tried with date in LAST_4_QUARTERS, but am getting ...
2
votes
1answer
294 views

Filtering dataextension row by Date

I am attempting to filter a dataExtension row by date. The column I am trying to access has a Date fieldtype and uses the current date as a default. An example of one of the values is: 10/24/2013 5:32 ...
4
votes
2answers
2k views

Invalid Date format from Database

Trying to insert a Contact from an Oracle Database: Contact Database Entity: @Temporal(TemporalType.DATE) @Column(name="DOB") private Date dob; Contact SOAP SObject set Birthday: Calendar ...
9
votes
2answers
2k views

New HTML5 Apex:Input issue

I'm trying to use new Input and InputField with type attribute. I need to use the date or datetime type as follow: <apex:input value="{!birthdayDate}" type="date" styleClass="select-box"/> ...
7
votes
1answer
7k views

Convert Date to milliseconds and milliseconds to Date

I am getting date into JSON as below : date=1382166999 It seems that date has been returned in milliseconds format. Can anyone please suggest the way to convert it into normal date format and vice ...
4
votes
1answer
1k views

What's the best way to enter a contract start/end date in an Opportunity?

I want to keep track of how long each opportunity is for, a 3 or 6 or 12 month contract for example, and report off this info. Should I just add a start/end date or is there a better way to enter this ...
9
votes
3answers
3k views

Getting a birthday workflow to work

I am looking to run a workflow off a birthdate and notify my user that this birthday is coming up in 10 days. I am using this formula: (MONTH( Birthdate)) = MONTH(TODAY()) && (DAY( Birthdate))...
5
votes
2answers
10k views

Date is showing a different date than the Date/Time Field

I have an issue when entering a date/time into a date field where the date increases by 1 day when after a certain time. Example would be 1/1/13 5:23PM PST converting to 1/2/13. This also occurs ...
2
votes
2answers
1k views

Dynamic date select list creation

I need to create a drop down with date values Like March 28-April 27 February 28-March 27 January 28-February 27 December 28-January 27 November 28-December 27 October 28-November 27 September 28-...
6
votes
1answer
10k views

Displaying date in visualforce force page in required format

I have a date fields which on displaying on VF page displays like 12/10/2012. But i want to display it like December 10, 2012. How can i do it? i am not getting the easy way.
3
votes
1answer
5k views

How to add days to a date field that spans over a year?

I have a field called: Payment terms ( holds values as: 30, 60, Net 30, Net 60..) which defines that payment due date of an oppty. Payment due date is a Date field, with default value of: Today(). I ...
2
votes
1answer
1k views

Incrementing Dates within a VisualFlow

I have a VisualFlow that creates a parent record (Cohort) and 10 child records (Class). Almost all of the fields are the same from class to class. The one notable exception is the date of the class. ...
2
votes
1answer
904 views

adding time to date fields

so im building an app that will run for a certain time from a start date to an end date so i have a start_date__c and end_date_c and i have a pick list duration_c which allows the user to select the ...
1
vote
1answer
3k views

What is the difference between printing System.now() and after using String.valueOf(System.now())

Hi i am not able to understand What is the difference between printing System.now() and after using String.valueOf(System.now()) bcz both giving me different out/put. Example: System.debug(' date()'+...
6
votes
5answers
23k views

i want to access only date form datetime

If i used System.debug('date='+DATEVALUE(System.now())); in developer console i am getting error msg by saying: method does not exist or incorrect signature for DATEVALUE(datetime) How i can do ...
0
votes
1answer
1k views

Use Javascript Date into Salesforce

I have a visualforce that uses Remote Action to do requests and send a date as parameter. There is a field date on my visualforce page, it'is an input text, and I need to use it in Apex Code as a ...
4
votes
4answers
10k views

How to resolve the Invalid Date error in Apex while uploading CSV file?

I am trying to upload the CSV file via Apex programming I am getting an error like Invalid Date Error. Please find the screenshot for more details. I have given code like this site.Approved_Date__c =...
2
votes
1answer
2k views

Calculating The Date Using Day of Week Month And Year in Apex

My question is different than the other date questions Ive seen here. I'm trying to calculate all of the dates using Day, Month and Year inputs. Right now I'm using a Custom Setting but think might be ...
7
votes
3answers
5k views

Get list of Date locales

It is possible to change the locales used for Date for users in the Admin. For example, Ireland is dd/mmy/yy The US is m/d/yyyy Is there anywhere where I can get a list of all locales? Thanks
3
votes
1answer
2k views

Converting a UTC String to a Date object

I have a UTC String Tue, 18 Jun 2013 23:00:00 GMT I wish to convert this to a apex Date object. How do I achieve this?
4
votes
3answers
245 views

Deserialising a DateString

I do: Date d = (Date)JSON.deserialize('2013-06-07T00:00:00.000Z', Date.class); System.debug('**********d = ' + d); I expect: *************d = 2013-06-07 00:00:00 I see: *************d = 2013-01-...
1
vote
1answer
1k views

Adding Date and Integer in jQuery

<script type="text/javascript"> function duedatecal(){ var dmy = $(".invoicedate").val().split("/"); alert(dmy); // it is in the format of mm/dd/yyyy var invoicedate = new Date( ...
1
vote
1answer
1k views

Parse Date From Querystring on VisualForce Page

I'm trying to pass a date from the querystring to a component on a visualforce page. with a url like this: salesforce.com/apex/mypage?mydate=2013-05-30 I thought it would be as simple as this: <...
3
votes
2answers
1k views

Update date field with null value using JS remoting?

With the Rest Toolkit, creating or updating an optional date field with an empty string results in an Invalid date error. Using null instead results in another error: Argument 1 cannot be null. How ...
3
votes
1answer
2k views

Auto-populate Month, Year and Quarter formula fields based on the CloseDate field

There is a object Name "Opportunity" in which there is 4 fields mention below Closed Date, Month, Year, Quarter. Now As i fill the date manually , Once i click on "Save" the remaining field i.e 'Month'...
-2
votes
1answer
27k views

How to assign string to date type in apex code [closed]

In my code i am getting this error: Illegal assignment from String to Date Kindly anyone explain how to assign a string to date field in List (APEX code). Here is my code: for (Integer i=1; i<...