I want to datetime data type "2012-06-15" format in asp

Posted by Mesh_2010 under Sql Server on 6/15/2012 | Points: 10 | Views : 753 | Status : [Member] | Replies : 3
Hi,

I am working Clasic Asp, i'm facing problem in date type format,
<code >
mdate = now()

strInsert = "Hits_Review '" & mdate & "'
</code>
where Hits_Review is Store Procedure and strInsert variable but
strInsert getting values is this format "16-06-2012"
but my table data store this format "2012-06-14"

Thanks
RameSH sinGH



Responses

Posted by: perfectchourasia-9163 on: 6/15/2012 [Member] Starter | Points: 25

Up
0
Down
Use datetime dt=DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString();

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

Mesh_2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mesh_2010 on: 6/15/2012 [Member] Starter | Points: 25

Up
0
Down

Hi Perfect.Chourasia@Gmail.Com
but i'm using Casic Asp

Thanks
RameSH sinGH

Mesh_2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: perfectchourasia-9163 on: 6/15/2012 [Member] Starter | Points: 25

Up
0
Down
string dt= Convert.ToString(DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Second.ToString());


string it will support string.

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

Mesh_2010, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response