You need to sign in to do that
Don't have an account?
CaptaConsulting
How to change the value of a field with type date?
Hi, I have a problem, i need to do something like that in a field with type date:
sobj2.item('StartDate').value = sobj.item('EndDate').value + 1;
but this give me an error.
Anyone can help me?
Thanks.
VÃctor Ã?lvarez
Hi CaptaConsulting,
I would recommend a date function. I think you have DateAdd and what not. Check the VBA documentation for details.
Hi , i have tried this in javascript :
var miFecha = new Date(sobj.item('EndDate').value);
miFecha.setDate(miFecha.getDate() + 1);
sobj2.item('StartDate').value = miFecha.getDate() +"/"+ (miFecha.getMonth()+1) +"/"+ miFecha.getYear();
and it works.
But i have a doubt....
i don´t know why when i go to salesforce to check the result .
The start date field has the value , for example 22/03/2004 and if a write the line in the sforce control
miFecha.getDate() +"\"+ (miFecha.getMonth()+1) +"/"+ miFecha.getYear();
in the window appear 23/03/2004 (the day before). So i need to increment two days the date value.
miFecha.setDate(miFecha.getDate() + 2);
Can anyone help me ? . Thanks.
VÃctor Ã?lvarez
Capta Consulting
Hi Victor,
I think what your are seeing is a problem with time zones.
Hi Dave,
it´s true, it´s a problem with time zones.
Thanks.
VÃctor Ã?lvarez
Capta Consulting.