Questions tagged [date]

A value that indicates a particular day. Unlike Datetime values, Date values contain no information about time

Filter by
Sorted by
Tagged with
1
vote
1answer
3k views

What is the difference between printing System.now() and after using String.valueOf(System.now())

Hi i am not able to understand What is the difference between printing System.now() and after using String.valueOf(System.now()) bcz both giving me different out/put. Example: System.debug(' date()'+...
6
votes
5answers
25k views

i want to access only date form datetime

If i used System.debug('date='+DATEVALUE(System.now())); in developer console i am getting error msg by saying: method does not exist or incorrect signature for DATEVALUE(datetime) How i can do ...
0
votes
1answer
1k views

Use Javascript Date into Salesforce

I have a visualforce that uses Remote Action to do requests and send a date as parameter. There is a field date on my visualforce page, it'is an input text, and I need to use it in Apex Code as a ...
4
votes
4answers
12k views

How to resolve the Invalid Date error in Apex while uploading CSV file?

I am trying to upload the CSV file via Apex programming I am getting an error like Invalid Date Error. Please find the screenshot for more details. I have given code like this site.Approved_Date__c =...
2
votes
1answer
2k views

Calculating The Date Using Day of Week Month And Year in Apex

My question is different than the other date questions Ive seen here. I'm trying to calculate all of the dates using Day, Month and Year inputs. Right now I'm using a Custom Setting but think might be ...
7
votes
3answers
5k views

Get list of Date locales

It is possible to change the locales used for Date for users in the Admin. For example, Ireland is dd/mmy/yy The US is m/d/yyyy Is there anywhere where I can get a list of all locales? Thanks
3
votes
1answer
2k views

Converting a UTC String to a Date object

I have a UTC String Tue, 18 Jun 2013 23:00:00 GMT I wish to convert this to a apex Date object. How do I achieve this?
4
votes
3answers
271 views

Deserialising a DateString

I do: Date d = (Date)JSON.deserialize('2013-06-07T00:00:00.000Z', Date.class); System.debug('**********d = ' + d); I expect: *************d = 2013-06-07 00:00:00 I see: *************d = 2013-01-...
1
vote
1answer
1k views

Adding Date and Integer in jQuery

<script type="text/javascript"> function duedatecal(){ var dmy = $(".invoicedate").val().split("/"); alert(dmy); // it is in the format of mm/dd/yyyy var invoicedate = new Date( ...
1
vote
1answer
1k views

Parse Date From Querystring on VisualForce Page

I'm trying to pass a date from the querystring to a component on a visualforce page. with a url like this: salesforce.com/apex/mypage?mydate=2013-05-30 I thought it would be as simple as this: <...
3
votes
2answers
1k views

Update date field with null value using JS remoting?

With the Rest Toolkit, creating or updating an optional date field with an empty string results in an Invalid date error. Using null instead results in another error: Argument 1 cannot be null. How ...
3
votes
1answer
2k views

Auto-populate Month, Year and Quarter formula fields based on the CloseDate field

There is a object Name "Opportunity" in which there is 4 fields mention below Closed Date, Month, Year, Quarter. Now As i fill the date manually , Once i click on "Save" the remaining field i.e 'Month'...
-2
votes
1answer
29k views

How to assign string to date type in apex code [closed]

In my code i am getting this error: Illegal assignment from String to Date Kindly anyone explain how to assign a string to date field in List (APEX code). Here is my code: for (Integer i=1; i<...
48
votes
8answers
36k views

How Can I Tell the Day of the Week of a Date?

I'd like to build in some logic based on the weekday (e.g. Monday, Tuesday, Wednesday) of a given date. How can I identify the date, using either formulas or Apex code?

1
8 9 10 11
12