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

learn more… | top users | synonyms

2
votes
1answer
11 views

Java sql.TimeStamp to Salesforce

I have a Java mapping that takes a field of type java.sql.Timestamp and insert it into Salesforce. Example of a field in the db: 2013-10-17 13:01:01 When it is inserted into Salesforce it looks ...
1
vote
1answer
14 views

Capturing Only Date & Month for a Date in Salesforce

We have a requirement to capture only "Date" & "Month" for a field (for e.g. Birth Date). We don't want to capture birth year. I think the best way to capture this in Salesforce would be by ...
4
votes
1answer
56 views

How to format today's date in this format?

How can we format today's date in the following date/time format? 2015-04-29T06:17:44.000-07:00 it represents yyyy-mm-ddThh:mm:sss-UTC any suggestions will be appreciated. Thanks in advance.
0
votes
1answer
37 views

How can I convert string 2015-04-15T12:48:00+05:30 to Salesforce DateTime format?

How can I convert string 2015-04-15T12:48:00+05:30 to Salesforce DateTime format? And also adjust the Timezone to be set to GMT +05:30?
1
vote
3answers
124 views

Use JavaScript functions on a Visualforce page

I am using a DateTime field on a Visualforce page which gets its value from the controller. I would like to know if I can use JavaScript or jQuery code directly on the Visualforce page to convert this ...
1
vote
0answers
32 views

Inaccurate count of weekdays for the month of March

Is there a reason why counting the days of the month of March is inaccurate? This is the method in counting the weekdays: public integer GetWeekDays(Datetime startDatetime, Datetime endDatetime) { ...
0
votes
2answers
48 views

Converting a Date from yyyy/mm/dd to mm/dd/yyyy including GMT Timestamp

String dateTimeString = '1970-01-08T23:45:27.461Z'; dateTimeString = dateTimeString.substring(0, dateTimeString.indexOf('.')); system.debug('dateTimeString'+dateTimeString); results in ...
2
votes
1answer
76 views

Formula Fields in Process Builder

I was trying to replicate the workaround for not being able to put a Now formula into a Process Builder action as found here: setting current date/time in process builder I created a formula field ...
3
votes
1answer
40 views

How to convert date time to date

On a http call response i was getting date as 1970-01-08T23:45:27.461Z. Here i have to change it to date like 1970-01-08 ... need some ideas... when i tried to take Date type in wrapper classes ...
1
vote
3answers
40 views

format the DateTime in an inputField

Is there a simple way to display the dateTime in an inputfield using an alternative dateTime Format? Or is there an easy way to display a datepicker when clicking in a normal textfield input?
3
votes
1answer
76 views

Calculating date/time x working hours from now

I need to trigger an email notification 9 working hours after a particular field is changed in Salesforce. So if the field is changed on a Friday at 4pm, I need to calculate now() + 7 hours + an extra ...
1
vote
3answers
150 views

setting current date/time in process builder

I'm trying to figure out if process builder can update a field to the current date/time when the criteria is meet. I want to track when an opportunity stage is selected. I know the tracking in down ...
1
vote
1answer
41 views

How to set Local Time when creating lead through API

I have a rails app that needs to occasionally add leads to our salesforce account. I got it to work just fine using the databasedotcom gem. Just one thing isn't working correctly, when I add a lead ...
0
votes
0answers
14 views

Process.Plugin Data Type Conversions Date invalid conversion at runtime

I am getting this error when i run a flow with a Apex Plugin Class that has input parameters for type Date. This is used in conjunction with a Flow. Error Message: System.TypeException: Invalid ...
1
vote
1answer
47 views

Using a custom formula field to create a timezone adjusted field using an existing datetime and timezone field

We would like to use an email alert to automate demo reminder emails for our prospects. We currently have a Demo Meeting Time field (datetime) and a Timezone field (text) to reference in a formula ...
1
vote
0answers
22 views

Standard DatePicker always set empty

We have some date fields in VF pages which were working fine. Suddenly some of them are not working. When user select the date from date picker, always it sets empty string to the textbox. ATM ...
1
vote
1answer
27 views

Workflow date/time criteria

I have a date/time field that store when an email was sent. I then want to have a workflow that resets another field on the record the next time the record is edited AND it is within a certain time ...
1
vote
0answers
15 views

DateTime: was there a (silent) change in the math for DateTime calculations in formulas?

In Summer'14 (likely also in Winter'14) there was a very special behavior of the platform to deal with precise datetime calculations as described here: Duration as difference betweed to Datetime ...
1
vote
1answer
27 views

DateTime Fields: is there and hidden feature / option to display seconds? Always?

I need to dive into precise time calculation and monitoring on the level of seconds. As it stands, Salesforce is managing internally seconds for DateTime. But - and this is very sad - the entire UI ...
12
votes
4answers
252 views

What is the purpose of Datetime.dateGmt() function?

In casual testing, I can see these give different results: //assemble from component parts Datetime now = System.now(); Date today = Date.newInstance(now.yearGmt(), now.monthGmt(), now.dayGmt()); ...
0
votes
1answer
65 views

Convert Datetime of one Timezone to Datetime of another TimeZone

There are lot of questions regarding the date-time conversions but need the right way to do it. My requirement is to take the user Input "DateTime" from a field and convert it to the specified ...
-1
votes
1answer
83 views

need to store date time based on customer timezone

Is it possible to calculate the timezone based on the country/state field value of a record? If so how? Is it possible to display the time field with the timezone it relates to? If so how?
0
votes
1answer
46 views

Convert A String to Unix Date format

I have a String stored as a Label in this format : 2014, 8, 01, 0, 0, 0. This is eventually meant to return a UNIX_TIME_STAMP. So I tried the following : private static final String myDate = ...
2
votes
2answers
358 views

visualforce page display time in timezone

I have a email alert that uses a Visualforce email template to generate an email with a date/time field that I want my to display as GMT, currently the time displayed in the email is offset by the ...
1
vote
1answer
21 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
198 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 ...
1
vote
1answer
180 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
50 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
2answers
260 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
138 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
215 views

Calculating and displaying the time difference between two date/time fields in 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, ar.Date_Time_Assigned__c, ...
1
vote
3answers
309 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
45 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
113 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
73 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 ...
3
votes
2answers
487 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
196 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
106 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
876 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
596 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
50 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
663 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 ...
6
votes
1answer
88 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
60 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
129 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
574 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
98 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
134 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
89 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
2k 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?