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

learn more… | top users | synonyms

0
votes
1answer
17 views

How to create formula field: difference between createDate and first Status Modification Date [on hold]

how to formula filed Calculate the difference between date create and first time status modification. kindly suggest.
0
votes
1answer
22 views

Get seconds and milliseconds from date/time in formula field

Is there a way break out the seconds and milliseconds from a date time field in a formula field? WHY: I want our crew people to use check-in and check-out from their mobile device. However, if they ...
4
votes
1answer
53 views

24 hours format from date/time field

I need to extract the hours from a Date/Time field in the format: 12:00, 13:00, 14:00, 16:00. Right now I'm using this function: "Date/time field".format('hh:mm:ss a'); But the hours comes in the ...
0
votes
1answer
28 views

Visualforce reading field as an object

I've been banging my head against a wall for this and can't seem to figure out this error. VF seems to be reading my field as an object. Here is my code LineitemNumber: <apex:outputText value="{!...
0
votes
1answer
28 views

Render based on lastmodified field

I have two LastModifiedDate fields on two different objects. I want to render text if one date is greater than another date in visualforce. I'm pulling in the data just fine through my controller and ...
0
votes
0answers
17 views

How to set date from “this” to “this” in Exact Target API?

I am using the FUEL SDK to work with ExactTarget API. I have figured out the date function in the examples provided here (https://github.com/salesforce-marketingcloud/FuelSDK-Python/) but this is only ...
0
votes
0answers
33 views

DateTime format and Comparision in apex [closed]

I have Date Time field Date field and picklist field. Scenario : Date Time field is a Asset local date time field and this is getting from google geolocation and timezone api. This field value ...
3
votes
2answers
36 views

Why do I get a null value when I try to use the ActivityDate to set a DateTime value in Process Builder

Pulling my hair out on this one... I need a process to update events marked as "All-Day" to regular events which start at 8AM and end at 5PM. So I need to set the ActivityDateTime, StartDateTime and ...
0
votes
1answer
22 views

Convert date in Marketing Cloud

I need a help to change the format of a date MM/dd /yyyy to dd/mm/yyyy I tried this: Works! Now: %%=Format(Now(),"MM/dd/yyyy")=%% Does not work! Date of Vestibular: %%=Format(%%Date Vestibular%%,...
1
vote
1answer
23 views

Load Picklist value dynamically using javascript [closed]

I am in a situation to load values of picklist dynamically using javascript. By Javascript am getting Date and Time of the given country using google geolocation and timezone api. From the catched ...
1
vote
1answer
27 views

Invalid date/time: 7/8/2016 10:32 PM Error on Task Custom button

I have created a custom detail button on Task. On click of the button I am calling URL like /apex/TaskVF?subject={!Task.Subject}&LastModifiedDate={!Task.LastModifiedDate}. I am getting the ...
0
votes
1answer
37 views

Datetime Format Method not working as desired

I came across a weird scenario. The format method is replacing month with '00' in its result. A portion of my code: (Executed Anonymously to test) System.Debug(logginglevel.error,'****m....
1
vote
2answers
18 views

Use DAteTime.parse to parse date which is NOT based on my locale

I need to parse date which come from service and is not at my time zone template. For example : '12/12/1990 2:08:24 AM'. Given that code : DateTime.parse('27/06/2016 09:07 AM') Got this error : ...
1
vote
1answer
22 views

Making opportunity close dates work as a date time

I just want to clarify all my assumptions about date/time with a "Close Date" field... My understanding is that the default "Close Date" field of the opportunity object is a "date" field that has no ...
1
vote
0answers
29 views

How can i show 24 hrs format in vf page?

I get 05:50 pm but it should be 17:50 <apex:outputText value=" {0,date,dd/MM/yyyy HH:mm}"> <apex:param value="{!wrap.lastmodifyDate}"/> </apex:outputText>
3
votes
3answers
57 views

Formula works on page layout, but displays #Error! on Report

I have an issue. I have a text field to store survey completion date and time. I created a formula field to capture date only. DATEVALUE( completion_time__c) It is showing correct date on Page ...
0
votes
1answer
34 views

Unable to calculate days in apex

I need to calculate days between two fields. So I use daysBetween to complete when I try to do with two dates. When I try with single values. But, when I try with list it throws an error like: ...
0
votes
1answer
33 views

Computations inside of an IF() Function

I was trying to add some arithmetic inside of an IF function for a custom formula field and it didn't appear to like the syntax... IF(AND(ISPICKVAL( Status,'In Progress'),ISPICKVAL( Priority ,'...
0
votes
1answer
62 views

Process Builder - Add Minutes,Hours to Event End Date

I want to make the Event End Date as NOW()+60 Mins in process builder while creating a new Event record. But It is adding 60 DAYS even though Event End date is date/time field. How do I add minutes ...
0
votes
2answers
27 views

How to use “hours” apex:inputField type of time

Is that possible to use only hours? below code I can have hours and minutes but I just need hours to display, is there any attribute that needs to set? Visualforce page: <apex:page controller="...
0
votes
3answers
26 views

Week number calculation is not correct

I need to calculate week number from date. I use this method: DateTime.newInstance(year, month, day).format('w') But this returns week number 1 for 1 Jan 2016. In fact this date belongs to week ...
2
votes
2answers
70 views

Formatting Date with outputField

Apparently if I want to format a date to my own format ie. 1 June 2016 10:44 am I can only do this with outputText but output text does not respect the users time zone so everything is GMT. If I use ...
1
vote
2answers
34 views

Need date time formatting help

This code record.Start_Time__c.time() is giving me 11:30:00.000Z but I just want 11:30am or pm or army time might be ok too. This code currStartDate.Date() is giving me 2015-07-08 00:00:00 but I just ...
1
vote
2answers
31 views

Why is this formula returning 5H and 60M instead of 5H 0M?

Here is the source formula. IF( Step_1_Diff__c> 0 , TEXT( FLOOR(MOD(Step_1_Diff__c* 24, 24)) ) & "H " & TEXT( ROUND(MOD(Step_1_Diff__c* 24 * 60, 60), 0) ...
1
vote
1answer
44 views

Bug in Salesforce Day calculation for a date if hours is 0?

Does Salesforce have a bug in the day calculation logic if the hours is 00? May 9th 2016 is a Monday. But Salesforce always returns Sunday. I guess when the hours is 00:00, its considering it as ...
0
votes
1answer
28 views

Need to find whether my time stamp is between the business hours

I am trying to implement SLA for Lead management. So handling all the SLA functionalities on a trigger and Apex class. I need help in getting the current time and comparing it to the defined ...
0
votes
0answers
31 views

Date being returned as sudo Date time (shows actual time value) in class but as date (with 00:00:00) in dev console

Ok, so I have this code that is supposed to return only the date of a date time. When executing the code in dev console the proper date is returned however when calling a method with the same code, ...
3
votes
2answers
76 views

Datetime format conversion in apex

I have an input field in my visualforce page which uses the html 5 input element as type="datetime-local". The value that I capture from the field is of the format 2016-04-09T23:58 . I want to use and ...
9
votes
1answer
218 views

DateTime.day() returning inconsistent value when created from system.today()

This came up on twitter from @britishboyindc: Why does this return 'Wed'? Date myDt = system.today(); DateTime myDtTime = (DateTime) myDt; system.debug(myDtTime.format('E')); For a user with ...
1
vote
1answer
86 views

Attempting to Insert CreatedDate - Field is not writeable: Account.CreatedDate

I am trying to insert a list of records with a CreatedDate of my choosing. I read the documentation about what settings are needed to grant access to insert values for the audit fields. I have ...
1
vote
0answers
80 views

Invalid date/time error

Following piece of code is throwing an error: System.TypeException: Invalid date/time: 04/07/2016 02:00 PM if (t.activitydate != null) { DateTime activityDate = t.activitydate; ...
0
votes
1answer
32 views

covert string into date time format in field ledObj.Scheduled_Time__c= csvRecordData[10];

this value is in my csv 5/4/2016 15:00:00 and when i upload csv its not save into field. public class importDataFromCSVController { public Blob csvFileBody{get;set;} public string csvAsString{get;set;...
1
vote
1answer
449 views

Date Picker in Visualforce page using Lightning design system

I am trying to use date picker in ligtning design system and and using the idea explained in this link to do it: Lightning (SLDS) styling for calendar This works fine in the browser on the desktop ...
9
votes
1answer
434 views

JSON: Cannot deserialize instance of date from VALUE_STRING

I'm officially breaking up with Salesforce Date parsing. This has got to be the most frustrating thing. I have the following date in a JSON string (full JSON below): 2017-06-03T10:34:24.000Z ...
3
votes
2answers
217 views

How to set Date/Time in salesforce using javascript

I am updating the record in the javascript while clicking on custom button. I have custom date/time field Approved_Date__c. I need to update that fields also using javascript. How can I assign current ...
6
votes
2answers
245 views

DateTime.Format() Documentation example causes exception

I'm trying to get a DateTime to format into a value to be used in a dynamic query. For some reason, the documentation snippet on how to format a DateTime for a query is giving me an exception. Im ...
1
vote
3answers
57 views

difference between two date time fields in days

I have a datetime field field1 which i am populating using NOW() formula. At some point later i want to know the difference between NOW() and field1 in number of days. I tried NOW()-field1 and ...
0
votes
1answer
30 views

How to retrive time from standard look up field in opportunity

Hi i got a requirement like to get time in standard look up called CreatedBy in opportunity page. Is it possible to retrieve only time from that field. Because it is Look up relationship of user.I ...
0
votes
1answer
47 views

Task Activitydate in user timezone

Trying to convert DAteTime field in local user time zone with following code but get an error: Compile Error: Method does not exist or incorrect signature: [Date].format(String, String) ...
2
votes
1answer
70 views

Date toStartofWeek() On Sunday?

Here is my code: Date myDate = startTime.Date(); //e.g. myDate =2016-03-01 Date weekStartDate = myDate.toStartofWeek(); //weekStartDate results 2016-28-02 When myDate equals 2016-03-01 the ...
3
votes
1answer
27 views

How does Salesforce Calculates Fiscal Periods?

We have offices around the globe (from India to San Francisco). Now I am told, that our West coast users, get their date reset at midday. As weird as it sounds to me, I am interested to know: How ...
0
votes
1answer
24 views

Lead date-time to calendar

Can I update my calendar in Salesforce with a date and time stored in a Lead record automatically? Happy to write a class or trigger, just wondering where to start. Thanks.
1
vote
2answers
52 views

assertion error with timezone in unit test

I have a unit test that is passes when the user running the test is in the CST timezone, but in any other timezone, the unit test fails with the assertion error: Assertion Failed: Expected: 2014-05-19 ...
0
votes
0answers
80 views

Date/Time input field

I am using Date time field. <apex:inputField type="datetime" value="{!ss.startDT}"/> When I save or do some operation The format gets changed when value is selected When Page gets refreshed ...
5
votes
2answers
591 views

DataTime.format returns Feb 32 as a result

I am at Australia and the time now is 13:00 Feb 1. With the following code: DateTime thisTime = DateTime.now(); System.debug(thisTime); System.debug(thisTime.format('DD/MM/YYYY HH:mm')); For the ...
0
votes
1answer
61 views

Date/Time Field User Locale

What is the best way to create a date/time field which doesnot automatically change date/time according to logged-in user's timezone? For example, if User1 (PST) sets the value in a date/time field ...
0
votes
1answer
91 views

Unit testing code which has logic around last login date of user

I need to write unit testing code which has logic around system field last login date of user.As per spring'16 release salesforce has added method for setting created date like below. Test....
-1
votes
1answer
71 views

Custom Segment: People who joined the list in the past 30 Days or have opened an email in the past 90 days

I would like to create a query that allows me to build a data extension for a segment that has either entered our list in the past 30 days OR opened an email in the past 90 days. I have the Query for ...
1
vote
2answers
178 views

Date not formatting correctly

I am using the below code to format the LastmodifiedDate for records from the Note table public List<wNA> rowList {get; set;} public class wNA implements Comparable { // see http://...
2
votes
1answer
35 views

Getting the year from a Date custom field

I have a custom field whose data type is "Date". I would like to use this field in a formula editor. I want to get only the year value from the date field( field api name is pres_date__c). When I used ...