Questions tagged [time]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
3k 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 ...
4
votes
1answer
400 views

Account Time Settings

I have set up the Marketing Cloud time zones to GMT. Issue is that every other time setting (automations, imports, etc) run on Central Time. Is this a default setting or is there a way to set ...
3
votes
2answers
2k views

What datatype for time only? (without date)

What is the correct datatype for a field that represents a time of day for a recurring event? I'm building a class enrollment system (for a hypothetical university, as a school project), and I need ...
3
votes
1answer
2k views

Cannot deserialize instance of time from VALUE_STRING value

I'm trying to parse a Time field from my lightning component to my apex controller by using JSON and deserializing it in apex into an existing Object. But unfortunately I'm always getting the error ...
2
votes
3answers
10k views

How to Get the Current System Time using SOQL

For tests proposes, I need to get the current system date. On Oracle we could use: SELECT SYSDATE FROM DUAL On SQL SERVER, we can use: SELECT GETDATE() AS CurrentDateTime How to query the system ...
2
votes
1answer
617 views

AutoSave information every 5 minutes- How to implement?

How would I go about triggering a apex controller method every certain period of time? This is the general idea I need to implement: "Autosave information every 5 minutes on a visual force page". I ...
2
votes
1answer
2k views

How to output time field in lightning component

I have used a time field which I want to show in a lightning component When I fill 8:00 in my field my result is 30600000 in my lightning component. I have searched for a time tag or formatting but ...
2
votes
1answer
585 views

Formula for writing a specific Day of Week date value?

Objective: create a List-View Button that writes the date value of the immediately upcoming Monday to a field in the selected record(s) E.g. if Monday is Dec 5, the expected output for writing a ...
2
votes
1answer
70 views

Is it possible to sum all the days of a set of events inside an opportunity and subtract from a total # of days?

I am using opportunities in Salesforce to track professional services engagements. As soon as the opportunity is won and closed, I will fill in a custom field called "number of days" which represents ...
2
votes
1answer
146 views

Changing case owner based on created date with respect to organization time zone

In Apex, I would like to get the cases created in January 2016 based on organization time zone. E.g. Organization time zone is GMT+8 and a case record has been created in 31/12/15 23:00:00 GMT , Is ...
2
votes
2answers
875 views

MavensMate Project Update - How to determine you need to stop waiting for sync?

Ah, I didn't want to post here but I'm desperate for some kind of guidance. So.. I'm new to MavensMate as of this morning. Looking for a best practice or way to know that my Sublime 3 project update ...
2
votes
1answer
110 views

Time duration between two time instances [duplicate]

Is there any method for getting duration between two time instances in hours and minutes ?
2
votes
2answers
713 views

como puedo resolver este error que me aparece / how to resolve error: 'apex cpu time limit exceeded'

tengo mas de 4000 registros en cada uno de los objetos como puedo resolver el error que me aparece de apex cpu time limit exceeded public class ConciliacionController { //declaracion de variables ...
2
votes
1answer
107 views

Format date time field to specific time with AMPscript in Marketing Cloud

I have a question; we are trying to send an appointment confirmation through Journey Builder. Now we are struggling to get the time right. It looks like there is added 1 and sometimes 2 minutes to the ...
2
votes
0answers
453 views

How to Avoid exceeding CPU Time Limit in Test Classes?

I am currently updating test classes in our org and it seems that most of them are exceeding the CPU Time Limit. They are using the @testSetup to create a lot of test data and it seems that these DML ...
2
votes
1answer
330 views

Time based workflow queue

Currently i am sending notification to owner and manager of lead after 5 days from lead creation based on few user profiles rule criteria in workflow. Now i need to send notificatios only when status ...
1
vote
3answers
827 views

Time Field on Data Load - “value not of required type: 5:33 PM”

I am attempting to insert some records on a custom object that requires a value in the Time Received field, of type Time. Within an existing record (created manually) the value inside the detail page, ...
1
vote
1answer
2k views

Convert system.currentTimeMillis() to MM-dd-yyyy HH:mm:ss.SSS in salesforce

I want the following to happen in salesforce. system.currentTimeMillis() to MM-dd-yyyy HH:mm:ss.SSS in salesforce. Anyone could please explain me.
1
vote
2answers
520 views

Storing time-stamps with millisecond precision

When you have automated processes interacting with your system, it is very common for multiple things to happen within the same second. In order to prove that these events happened in the correct ...
1
vote
1answer
99 views

Adding a field into Workflow Time Trigger Edit Drop Down Menu

New here. I'll be as brief as I can. I'm trying to trigger a mail before a subscription expiry date. I have two tables: A 'Contact' Table and an 'Account' Table. How can I add an 'Account Expiry' ...
1
vote
3answers
1k views

Formula field for the Difference between 2 time values in picklists

I am very new to Salesforce and have to write a formula field based validation. I have been trying but so far haven't been able to write a correct formula. My requirement is as follows: I have 2 ...
1
vote
1answer
781 views

How to remove AM & PM from Time field?

I have a custom field with DataType is TIME. I want to remove AM and PM from the Field. How can I do this?
1
vote
1answer
54 views

How to utilize buisnessHours class instead of time class

I have a main if statement in my class that utilizes CreatedDate.hour() to execute certain code between 6pm and 8.59am and the ELSE is 9am to 5.59pm which would be within business hours if I could get ...
1
vote
2answers
627 views

DateFormat Function in Marketing Cloud

I would like to have a Date like this: 2016-10-14T08:26:33Z But when i do this: %%=FormatDate(DateAdd(NOW(), "6", "H"), "yyyy-mm-ddT","hh:mm:ssZ", "nl-NL")=%% It returns: 2016-10-14T 09:04:26-...
1
vote
0answers
72 views

JSON time fields

We have a problem with deserialize and serialize salesforce time fields Since Json and salesforce time fields both consist of "colon" we need to replace with a special character before deserialize ...
1
vote
0answers
20 views

How to get records created between timeframe in a report

I need to create a report of all the records between 7am to 5pm CST/CDT everyday. How can I achieve this? The solution I tried - Created a formula field which extracts Hours from created date (...
1
vote
0answers
66 views

Is it possible to calculate the difference between 2 Time Fields with Formula?

I am trying to calculate the difference between 2 Time-fields with a FORMULA . (So no DateTime) I know it is possible in Apex, but I am wondering if it is possible in a Formula as well. I tried a lot ...
1
vote
1answer
292 views

Using the wait activity by attribute for time values only

I have a data extension that has all our subscribers and a column with the most optimal hour of the day to send them an email. I want to reference this in my journeys and add this attribute in the ...
1
vote
1answer
1k views

Filter Reports by the Time of their CreatedDate

I figured that the CreatedDate will not show the time in the reports section. So I made a DateTime formula field to take the value from CreatedDate. Now this shows the time value inside the reports. ...
1
vote
0answers
43 views

Alternatives to Time Field? [closed]

SalesForce does not have a Time field type for sObjects which is a real pain. I am working on a scheduling app where users and facilities specify daily blocks of time when they are available (open). ...
1
vote
0answers
113 views

Apex cpu time limit without change anything [closed]

In my instance I could insert or update record with a batch size of 100 records without problem. The last week and with the same code in production we started to get the apex cpu limit and we have to ...
1
vote
0answers
144 views

Debug Logs Explanation

I'm trying to understand the debug logs Salesforce provides. There are actually two duration(in ms) for every webservice called. One at the top One at the bottom giving up split up method wise The ...
1
vote
1answer
131 views

Why week of year is wrong?

I'm using this code : Time t = Time.newInstance(12, 0, 0, 0); DateTime dt = DateTime.newInstance(Date.parse('22/02/2016'), t); system.debug(LoggingLevel.WARN, Integer.valueof(dt.Format('w'))); It ...
1
vote
0answers
93 views

How to create a Custom Pop Up for Task?

I want to create custom pop up for Tasks which will be opening on specified time . Because standard task pop up will only come for Day wise(Again it will calculate based on starting of the day) and I ...
1
vote
1answer
33 views

Calculate response time for task closure

Please help me in the approach. I have a task object and a field called task executioner.I want to have timer set on the record. When the user will edit the record the timer will start and when it is ...
0
votes
4answers
11k views

How can I get my correct current local time?

I need to get the current time but to be in type DateTime. I use: DateTime now = System.now(); but it returns wrong time. I execute the code in 2017-08-04 00:38:46 AM but it returns 00:38:46:023 ...
0
votes
2answers
53 views

Format AM/PM DateTime to 24 hour time

I have a data 9/14/2019 4:37:57 PM I want to format this to: 20190914T163757 How do I format it so that if it includesPM to 24hour using ampscript?
0
votes
1answer
298 views

Time field based on TimeZone

Is Salesforce time field dependant on timezone. Is the time field value change based on TimeZone.
0
votes
1answer
458 views

Time comparison in Apex

I have below code Time startTime = objAvailableTime.StartTime; Time endTime = objAvailableTime.EndTime; List<Time> lstTime = new List<Time>(); ...
0
votes
3answers
2k 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 ...
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 ...
0
votes
1answer
44 views

Want to Check whether the Account create date is within the Business Hour or Not

I am creating a account so while creation it should check whether the created date is within the Business Hour or not. If yes do Action 1 else Action 2.
0
votes
3answers
833 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 &...
0
votes
2answers
2k views

Formating the new time field in Visualforce

I am trying to format the new Time field type in Visualforce but with no success. I'm trying to use the same method as i use for date formatting but it does not compile my code with the error: '...
0
votes
1answer
87 views

Application limits

My collegue has received the below notification. We have never received this before. Can anyone please advise what action needs to be taken? Your organization has reached its hourly limit for ...
0
votes
1answer
168 views

How to Create Time Lapse duration field

In our organisation multiple teams working on a single Business process (record type of Case). Means multiple teams works on a single Case. So, we have a requirement to calculate how much time taken ...
0
votes
1answer
343 views

DateTime set to an hour earlier

I have an object of type Time startWorkingTime and object of type DateTime nextBusinessDay. I want to create new object of type DateTime based on startWorkingTime and nextBusinessDay. Here is my code:...
0
votes
1answer
32 views

Unable to create time datatype field through visualforce page

I tried to write a formula and extract time field through date time field. But user needs the time field because of specific requirement. I tried to create a Visualforce Page with Static Resources ...
0
votes
1answer
1k views

DateTime formula field to compare to a specific time

I am creating an entry criteria for a milestone to kickoff. A separate workflow rule populates a DateTime field (RMA_Time__c) with NOW(). When RMA_Time__c is populated and the populated time is before ...
0
votes
1answer
61 views

I am getting the following error message - Error: Unknown property 'OpportunityStandardController.line2

Error: Unknown property 'OpportunityStandardController.line2 here is my code up to where I get stuck: <apex:page standardController="Opportunity" showHeader="false" renderas="pdf"> <table ...