------------------------------------------
ddat = new Date();
ddat = new Date(ddat.setDate(new Date(stdate.value).getDate()+parseInt(days)));
var d=newdate.getDate();
var m=(newdate.getMonth()+1);
var y=newdate.getFullYear();
-----------------------------------------
day = new Date()
day = new Date("August15, 2006 08:25:00")
day = new Date(06,8,15)
day = new Date(06,8,15,8,25,0)
Ref: http://msdn.microsoft.com/en-us/library/ms187928.aspx with convertion chart
select convert(varchar, getdate(), 100) convertResult,100 style union
select convert(varchar, getdate(), 101),101 union
select convert(varchar, getdate(), 102),102 union
select convert(varchar, getdate(), 103),103 union
select convert(varchar, getdate(), 104),104 union
select convert(varchar, getdate(), 105),105 union
select convert(varchar, getdate(), 106),106 union
select convert(varchar, getdate(), 107),107 union
select convert(varchar, getdate(), 108),108 union
select convert(varchar, getdate(), 109),109 union
select convert(varchar, getdate(), 110),110 union
select convert(varchar, getdate(), 111),111 union
select convert(varchar, getdate(), 112),112 union
select convert(varchar, getdate(), 113),113 union
select convert(varchar, getdate(), 114),114 union
select convert(varchar, getdate(), 120),120 union
select convert(varchar, getdate(), 121),121 union
select convert(varchar, getdate(), 126),126 union
select convert(varchar, getdate(), 127),127 union
select convert(varchar, getdate(), 130),130 union
select convert(varchar, getdate(), 131),131
order by 2
convertResult | style |
Mar 18 2016 5:27AM | 100 |
3/18/2016 | 101 |
2016.03.18 | 102 |
18/03/2016 | 103 |
18.03.2016 | 104 |
18-03-2016 | 105 |
18-Mar-16 | 106 |
18-Mar-16 | 107 |
5:27:19 | 108 |
Mar 18 2016 5:27:19:257AM | 109 |
3/18/2016 | 110 |
3/18/2016 | 111 |
20160318 | 112 |
18 Mar 2016 05:27:19:257 | 113 |
05:27:19:257 | 114 |
3/18/2016 5:27 | 120 |
27:19.3 | 121 |
2016-03-18T05:27:19.257 | 126 |
2016-03-18T05:27:19.257 | 127 |
9 ????? ??????? 1437 5:27:19 | 130 |
9/06/1437 5:27:19:257AM | 131 |