Share
Go down
a71688
Regular Participant
Regular Participant
Posts : 27
Join date : 2014-07-23

Converting dates. Please needed for assignment :)

on Fri Nov 14, 2014 7:08 pm
Hi Guys

I am working with selenium iDE. Question how can i convert below date date 



storeEval
var d=new Date();d.toString()
date2


echo
${date2}





to Nov 14, 2014 ?

currently it is writing Fri Nov 14 2014 12:57:19 GMT+0100 (Romance Standard Time)
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 32
Location : Denver, CO

Re: Converting dates. Please needed for assignment :)

on Thu Dec 04, 2014 10:16 pm
storeEval
var d=new Date(); d.getMonth()+1;
mon

storeEval
var d=new Date(); d.getDate();
date

storeEval
var d=new Date(); d.getFullYear();
year

echo
${mon}/${date}/${year}


This will give you 12/4/2014
a71688
Regular Participant
Regular Participant
Posts : 27
Join date : 2014-07-23

Re: Converting dates. Please needed for assignment :)

on Tue Dec 16, 2014 4:26 pm
Thanks worked Smile
Sponsored content

Re: Converting dates. Please needed for assignment :)

Back to top
Permissions in this forum:
You cannot reply to topics in this forum