A value that indicates a particular day and time, such as a timestamp.

learn more… | top users | synonyms

1
vote
1answer
16 views

Query Records “where MyCustom__Date__c.Month()=1”

I want the records where MyCustom_Date__c month is = January. Where my field MyCustom_Date__C is formula field lst="select Name from CustomObj__c where MyCustom__Date__c.month() = : 1" Its giving ...
0
votes
1answer
30 views

How to convert string into datetime format?

Hello Everyone I'm new in sales force and I want to change datetime format so that first of all I got datetime and after that I have convert it to string with different format . Now I want to again ...
0
votes
0answers
19 views

Set Default Value in a Formula Date/Time Field

I am looking to create a formula date/time field that will give me for example 12/05/2014 3:00 PM for today and then tomorrow it changes to 12/06/2014 3:00 PM. The date but not the time will change ...
1
vote
1answer
32 views

Date field is also giving me time

I am needing some help with a query that contains a date. I am collecting this date through a VF page with the help of a birthday fake contact field, my class is something like this: Controller: ...
0
votes
0answers
18 views

report showing how much time a field was not null

I am in need to create a report showing how much time a certain field was not null. In particular, I need to show how much time a case has been in a certain division (I have more than one division ...
0
votes
2answers
36 views

Assigning a date value to a date field in Apex

I am having a problem with Apex. I have a custom field on my Case object: DATETIME: registerDate I have a Visualforce page for which I use input values, and I know how to use these input values to ...
1
vote
1answer
22 views

Help with workflow rule criteria

I need to include a date field in my workflow rule criteria. The field "registerDate__c" is of type DATETIME. My criteria should express that the registerDate__c is longer than 30 days ago. I ...
1
vote
2answers
51 views

how to calculate hours and minutes

I am getting the difference in time between two date/time fields. I need to show the time in hours:minutes in another field. Long timeOpen = BusinessHours.diff(bh.Id, ...
1
vote
3answers
88 views

How to display two times from date/time column

I have two date/time fields which hold the duration of an event (i.e. start time = 11/11/14 12:00, end time = 11/11/14 18:00) I would like to display this as 12:00 - 18:00 on my force.com page, how ...
0
votes
2answers
40 views

Which code is heavy when being executed

I'm comparing records based on their dates, if the date is equal to a particular month its data goes to a particular object. Example: If this the record is in the current month then it will be saved ...
0
votes
1answer
32 views

Use CALENDAR_MONTH/CALENDAR_YEAR with Task.AtivityDate in SOQL Query

Need your help here. I'm building a calendar to show the Due Dates of my tasks by month. My query is this: SELECT Owner.Name, OwnerId, id, Subject, ActivityDate, Status FROM task WHERE ...
1
vote
1answer
21 views

SOQL query to fetch incremental data hourly

I am using Jitterbit to confirgure data transfer to and fro my MySQL database. My requirement is such that I need to fetch newly created records from Salesforce into my database every hour. For this ...
2
votes
2answers
197 views

How to determine UTC for a date/time represented in a time zone other than the current user's time zone?

How do you determine the UTC of a civil date/time represented in a time zone other than the current user? I know this occurs automatically when using the DateTime.newInstance() method but it's always ...
0
votes
0answers
112 views

How to customize Date format in Exported CSV from Visualforce?

I'm trying to build an export to CSV Visualforce page with dynamic fields that may include Date/Datetime fields in the output. The trouble coming in my way is, if I don't format date/datetime fields, ...
1
vote
3answers
47 views

Date Formatting: Output Database Date in Same Format As System.today()

I have a date field in my object. After I fire a select query , the returned format of the date is : 2014-09-16T11:55:00.000Z I have a requirement where I need to convert the above date into ...
1
vote
2answers
169 views

Difference between 2 DateTime fields in Hours and Minutes with timezones

I am having trouble in finding the difference between 2 datetime variables and reducing the offset timezone difference in order to get the local time from the salesforce generated GMT time. I have a ...
4
votes
1answer
182 views

how to use apex:inputField type of time

According to the docs on apex:inputField: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputField.htm I can use type="time". However when I try this with a date-time field ...
0
votes
2answers
38 views

Change flag colour for case object

I have a requirement here. I have to change the color of a case flag from yellow to red depending upon certain criteria. the criteria is Whenever an Email-to-case is created and Case owner is in ...
1
vote
1answer
260 views

Need to Filter a VF page with date input and pass to SOQL statement in controller

I have been working on this for a few weeks now so any assistance would be wonderful. I am trying to create a report with a VF page to pull information from some custom objects and their associated ...
5
votes
1answer
67 views

Date format compatibility

I have received a datetime format not supported to load in salesforce. Can someone suggest a way out here. Format received: 29-JUL-13 01.17.05.335000000 PM SFDC supported Format: ...
4
votes
0answers
36 views

How to enter Seconds into Datetime fields using the standard UI

Say you have a datetime field Start__c on a pagelayout. Now try to enter a date (we have DE locale enabled, but should be similar in EN): 31.08.2014 14:53 ==> works 31.08.2014 14:53:38 ==> doesn't ...
3
votes
1answer
64 views

Duration as difference betweed to Datetime fields does not respect Seconds

It seems that Seconds are ignored in formula fields if you create the difference between Datetime/Time fields. Say you have two Datetime fields: End__c and Start__c Take a formula field Duration__c ...
2
votes
3answers
175 views

How to convert Date Format of NOW() to MM-DD-YYYY in Formula Editor

I have a requirement to convert the DATE FORMAT of NOW() to MM-DD-YYYY in formula editor. By doing using DATETIME.format() i can do it in APEX Classes, but i cannot get the same value in FORMULA ...
6
votes
0answers
63 views

Filter empty date field in SF analytics api

Using the analytics rest api we need to add a filter to a date field to get only the records where this field is empty. In json: { "column": "Account.Date_Field__c", ...
3
votes
2answers
86 views

Workaround for Possible Datetime.format() Framework Bug

I am generating a set of date-based keys by looping over a start date and adding successive months to the initial Datetime object. I seem to have run into a bug in the format() method of the Datetime ...
1
vote
1answer
47 views

Check Date is within THIS_WEEK

I have to check whether "mydate" is in within the current week or not. DateTime mydate= DateTime.newInstance(Date.Today().Year(),obj.Birthdate.Month(),obj.Birthdate.Day()); if(mydate==THIS_WEEK){ ...
2
votes
2answers
680 views

Calculate days between DateTime field and Now()

I am trying to create a formula in my custom report to show number of days between CUSTOM_FIELD (datetime field) and NOW(). How can I do this?
0
votes
1answer
789 views

Error: Compile Error: unexpected token: public at line 1 column 0

I need some help, this is my trigger. i have created a custom field on the user object called lastlogindate__c . i am trying to get the value from lastlogindate populated in the lastlogindate__c i ...
0
votes
1answer
30 views

Extract logindate from user object and populate a new field in a custom object via batch apex

I would like to apologise if any spelling mistakes , in currently posting this on an iPhone whilst I commute home I found a link online which I think meets my requirements As we are all aware ...
0
votes
0answers
27 views

Grab Date via Apex from Inbound Email

When using Salesforce for Outlook, we'd like to somehow pass the date/time the original email was sent, so we can track exactly how long a case / response took. I know there are many items that can ...
2
votes
1answer
203 views

How Do I populate the Last Login Date from User object into a custom object/field? [duplicate]

Aim – Pull the last login date from the user object into my custom object and populate a particular field Now I am under the impression that LastLoginDate on the user object is not accessible through ...
2
votes
1answer
764 views

Formula to calculate time between two dates, Salesforce example broken

I'm aware the question "How do I calculate the time difference between two date/times?" has been asked a lot, and not just on here. After doing the recommended thing and looking on this page (right ...
3
votes
1answer
91 views

Jitterbit time format issue

I am using Jitter bit to load the data into SFDC. I have the separate fields for date(Field1) and time(Field2) in my text file. I have the upsert query and I did the mapping for salesforce like this, ...
1
vote
2answers
678 views

How to calculate the time between two DateTimes?

I know that you can use daysBetween() for two Date objects, but what would I use to calculate the elapse time in seconds between two DateTime objects?
3
votes
1answer
118 views

Create a new date

Ok why isnt this working? it keeps saying Variable does not exist DateTime on the second to last line? String svalue = '2014-06-06T04:00:00.000+0000'; DateTime tempDate; try { tempDate = ...
3
votes
1answer
203 views

Datetime won't save using correct time zone

Ok so I've been trying to sort this out all day and I've not made a single bit of progress. I have a set up a site on Salesforce as a web service endpoint. A client's system sends an HTTP request ...
1
vote
1answer
91 views

Why is the date saving as an hour later?

The company default time zone is GMT (+00:00), and a date sent using the API is coming through like this: 09:16:37.032 (32355740)|USER_DEBUG|[17]|DEBUG|Date/Time: 2014-06-19T10:16:00.977 It ...
6
votes
0answers
161 views

Inline editing error: “Value cannot exceed 0 characters”

I'm experiencing a strange error with Salesforce's Inline Editing in a custom visualforce page. I have a sObject with a date field called Start_Date__c, and I have inline editing set up in the ...
2
votes
1answer
50 views

What is wrong with this date?

Can anyone explain what is so erroneous about this date? Class.SMSCallbackController.doGet: line 42, column 1 14:55:07.039 (39781770)|FATAL_ERROR|System.TypeException: Invalid date/time: ...
3
votes
1answer
209 views

Can Date Field have only Month & Year

I am trying to get Attendance Records where Date's are in selected month. I have create picklist on VF page for months and year, but this doesn't seem logically true ! I think that we should have ...
1
vote
1answer
67 views

Non editable fields in the runtime, can that somehow be overcome?

I try to do my dynamic filtering on the form based on an object values, entered by a user using apex:inputField. The object stays in memory and never gets inserted to the DB. When I try to assign ...
0
votes
1answer
57 views

Storing time from input field

I am working on a form that has to contain a time input, maybe something like this figure. The problem is that there's no data type such as time, and I tried to use bootstrap timepicker but it ...
0
votes
2answers
3k views

How to convert date string to DateTime type without GMT?

I have a string = '11/6/2014 '. I want to convert it to a DateTime DateTime dt = DateTime.parse('11/6/2014'); this causes an error, so I run the code below and it does work: DateTime dt = ...
0
votes
1answer
536 views

Converting external datetime or timestamp formats using existing methods?

I'm making an API callout that returns a date/time in the following format: "Thu May 8 1:21 PM EDT" as well as a timestamp in the following format (millis since unix epoch): "1399569719024" ...
3
votes
0answers
239 views

How to produce correct DateTime Format in Apex: Outputlink / Apex: Param

I am using a visualforce page email template in which Recipient is a Contact, relatedTo is an Event, it dynamically generates an *.ical Attachment. That works just fine by using <apex:outputText ...
1
vote
1answer
53 views

How does SystemDatetoLocalDate work in ET?

Using AMPscript to try and allow our sales staff to enter items in UCT but have them display elsewhere in local time. I understand that the server uses CST which like UCT doesn't shift to or from ...
1
vote
1answer
215 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 ...
1
vote
1answer
91 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 ...
2
votes
2answers
105 views

Formatting Date in Visualforce - Complex version

I have this code <font face="Arial">Invoice Date: <apex:repeat value="{!Opportunity.Invoices__r}" var="line2"> {!line2.Invoice_Date__c} </apex:repeat> </font> which ...
2
votes
1answer
1k 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]) { // ...