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

learn more… | top users | synonyms

1
vote
2answers
13 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
28 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]) { // ...
1
vote
1answer
29 views

False Error during migration: Date Modified earlier than Date Created

When I try to insert some records, it throws back an Error report telling me that some of the records have a modified date before the created date. When I look at the corresponding field, this is not ...
1
vote
1answer
22 views

Date Stamp on one criteria within Picklist

I need some help Aim – When stage = ’Declined’ populate a field called “Declined date” with the date that declined was selected Field: Stage Data type : Picklist I know how to create a workflow on ...
1
vote
1answer
40 views

How to Apply a DateTime Filter when using SOQL via REST API

I'm working on a ASP.NET application which is calling our salesforce org via REST API. There is a feature to search data based on time period(DateTime field) as follows. Today Yesterday Last 7 days ...
2
votes
1answer
65 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 ...
5
votes
2answers
141 views

JSON.serialize is mucking with my datetime objects. How do I fix this?

I feel that the following assertion should be true, but it is not: DateTime testDate = DateTime.now(); System.assertEquals('"' + testDate.format('yyyy-MM-dd\'T\'hh:mm:ss.SSS\'Z\'' + '"'), ...
5
votes
2answers
26 views

Is there a way to set SystemModstamp on a newly created SObject in a unit test?

I need to create a SObject in a unit test with the SystemModstamp set. I've been using Opportunities in my unit test, but I am not tied to that specific SObject. I also am not tied down to ...
2
votes
0answers
29 views

Parsing the datetime field in Site.com for pick lists

I am creating pick lists that contain months and years on an event list page in Site.com. The page brings in data for the events using a data-repeater. One of the fields being used is datetime which ...
2
votes
2answers
37 views

how to avoid picking old date in datetime picker in inline vfpage

I have a date time picker as a calendar. is there anyway that i avoid backdating in the calendar ? It should be only pick today and future dates. Thank you all.
1
vote
1answer
56 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 ...
0
votes
3answers
59 views

Datetime.now.getTime() not returning correct value

I am getting a timestamp for current datetime using the following code public Static String getGenerateTimeStamp() { system.debug('Datetime : '+ DateTime.now()); system.debug('timestamp : '+ ...
3
votes
2answers
51 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 ...
1
vote
2answers
41 views

Can the AMPscript DatePart(D1, S1) isolate AM or PM?

I see here that S1 = The part of the date to retrieve. Valid values include year (Y), month (M), monthname, day (D), hour (H), and minute (MI). I don't see a script to isolate the part of the ...
0
votes
0answers
66 views

Clarification about Timezone Conversion in DateTime

There are lots of posts regarding DateTime format. But I have things that I still can't find a solid answer for. 1). I Noticed that datetime field values are converted into UTC and that converted ...
1
vote
1answer
102 views

ExactTarget Date and Time guidelines in AMPscript

Want to address the fact that Kelly's answers below did get me to the point of resolving this date/time challenge within AMPscript and ExactTarget. There was considerable effort involved in mastering ...
4
votes
1answer
105 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 , ...
1
vote
1answer
41 views

Suggested date & time pickers for ExactTarget Landing Pages using AMPscript?

We're trying to determine an easy and usable solution to allow our administrators to have a date & time selector (almost certainly jquery or javascript based) available for forms built in ...
2
votes
1answer
54 views

Created Date time difference

So I have a visualforce page displaying a query. But when it is being display on a force.com sites page. The created dates are different. Visualforce page inside sandbox: Visualforce page on ...
0
votes
1answer
125 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, ...
0
votes
1answer
92 views

How to Change Time of Date/Time Field

When I am trying to save the Date/Time Field of an Object,the time should saved by round off to some fixed time e.g. when I am selecting date as 2/26/2014 the time automatically comes as the present ...
7
votes
1answer
186 views

It appears that > behaves like >= in a soql query. Why?

The query: SELECT systemmodstamp, id FROM Lead WHERE SystemModstamp > 2013-12-03T01:13:09Z AND SystemModstamp < 2014-02-11T12:18:41Z ORDER BY SystemModstamp ASC ALL ROWS returns several ...
4
votes
2answers
159 views

Converting from DateTime to Epoch - and back

I found the question about converting epoch time to normal time, but I'm having two problems: When I run DateTime.newInstance(1391529600 * 1000) I am getting the wrong answer I want to convert ...
3
votes
2answers
193 views

Is there a default TimeZone in which Date fields are stored in Salesforce?

There is a Date Field whose value is I gave as 15th Oct 2014. When I insert the same, Is this an absolute time value irrespective of any Time-Zone; does it matter who inserted the Date field? I have ...
1
vote
2answers
163 views

date time value minus numeric doesnt work

i have a trigger that will update a custom date field in my case but it seems like my calculation is wrong. This is my trigger: c.SLA_Cont_Time__c = System.now() - c.SLA_Days_mins__c; ...
4
votes
2answers
324 views

How is a DateTime object formatted into a String suitable for a String based SOQL query?

In order to write a where clause against a datetime field, you need to format your dateTime object into the following format: WHERE SystemModstamp > 2005-10-08T01:02:03Z How do you correctly ...
4
votes
1answer
57 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 ...
1
vote
1answer
70 views

How to extract date from 2014-02-01 00:00:00?

In my apex class i am trying to get the date from 2014-02-01 00:00:00. It is a date field on object, which i am using on a VF page. When i select the date and click submit and try to soql i am getting ...
4
votes
2answers
97 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: ...
0
votes
1answer
38 views

system date and object field date difference

I have one object which has one date/time field. When I query that field value using workbench,it display as [2014-01-07T19:04:00.000Z ]. But when I go and check from force.com UI, it display as ...
2
votes
1answer
55 views

Why do some DateTimes in ET have A LOT more precision

Consider the following to outputs from the same query in ET: select JobID, SubscriberKey, EventDate from _open with (nolock) where EventDate > '2013-04-30' and EventDate < '2013-10-31' ...
0
votes
1answer
465 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
367 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 ...
4
votes
1answer
192 views

Datetime parsing

String date = ''; String time = ''; How to concatenate the two strings to StartDatetime(Datetime datatype) field? I am using two strings date and time seperately ,If i fill date & ...
1
vote
1answer
216 views

How to Update a datetime field with current date time in VF page?

I need to update a datetime field with current date time in VF page using JavaScript.Currently my code is like this : var newRecords = []; var a = new sforce.SObject("myObj__c"); ...
3
votes
1answer
146 views

Regex a datetime from JSON and convert to miliseconds

I've JSON like this: "to" : "2013-11-28T20:58:00.000+0000", Which I want to make into: "to" : "/Date(1296547200000)/", The furthest I got with regex is replaceAll('(?m)(?i)"from" : "(.+?)("$)', ...
3
votes
1answer
234 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 ...
5
votes
2answers
942 views

Calculating duration of time using only Hours, Minutes and Seconds

How can I calculate duration of time between two fields using only HH MM SS? I would need two fields that operator would plug in HH MM SS and have duration calculated into a third field in format ...
5
votes
2answers
896 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 ...
5
votes
4answers
654 views

javascript date on custom button issue..?

When i click on this custom button i need to fill a field with the current date and time.But some times its giving me a previous date i.e exactly 1 day prior to current date..i dont know why this is ...
1
vote
3answers
729 views

Setting default value for datetime field

What format do I need to enter when setting a default value when creating a datetime field?
2
votes
2answers
813 views

Timezone issue with Datetime Field [again ;-)]

I probably saw this question 100 times, but still don't understand. So basically I want to display only the Time from a datetime field but not the Date. However I always get the GMT time. I know I ...
0
votes
2answers
2k views

How to convert a text to dateTime

How can i convert a string like this Wed Aug 07 04:30:00 GMT 2013 to a dateTime value?
0
votes
4answers
229 views

DateTime function and substring in vf page

I want to substring my datetime field in vf page.In my vf page i am using code like. <div>{!LEFT(d.datetime__c,8)}</div> here i am getting error LEFT function required text type.. So ...
1
vote
2answers
215 views

Restrict users from entering unwanted texts in datetime field

I have a datetime field ( thru date picker) in Visual force page , while on submitting the form , i receive the entered date in the Apex class for validation purpose. How to check whether the user has ...
1
vote
2answers
440 views

Date/Time field - Local and GMT

I have a custom date/time field in the Lead object. Let's say user enters 7/8/2013 6pm CST but the value is storage in the database in GMT = 7/8/2013 11pm GMT. (Salesforce storage all date/time values ...
2
votes
1answer
222 views

how do we check if a date is a valid date

I am trying to set a next schedule date for a process to run. This scheduler needs to display up a Vf page when the user logs in or when he loads up a page. I am running a scheduled batch process to ...
3
votes
2answers
68 views

On reports other than on object Case, i am unable to get created date and time in the report. Is this expected? Are there any workarounds?

On reports other than on object Case, i am unable to get created date and time in the report. Is this expected? Are there any workarounds? Or am i missing something. I am sure that createddate ...
2
votes
1answer
336 views

Datetime.parse issue..?

I am convert date/time in string to datetime apex using datetime.parse().But it is is subtracting 1 min.. String s1='5/23/2013'; String t1='10:00 PM'; String s2=s1+' '+t1; Datetime ...
0
votes
1answer
209 views

Datetime - problem with hour formatting

Datetime t = Datetime.now(); System.debug(t); System.debug(t.format('HH hh kk KK')); Result: 13:37:57:233 USER_DEBUG [16]|DEBUG|2013-05-17 11:37:58 13:37:57:234 USER_DEBUG ...