hello..! required a help

i want to store a date in sql server field...i set the field type is datetime..bt i jus want to save only Month and year ...kindly help me in it..!

i m working with vb6 i set the date formate

myDate = Format(cmbMonth1.Value, "MMMM-yy")

bt the date store lyk dis (02-Aug-10) in database n i only want (Aug-10)

plz help me wat can i do..!

its urgent

Recommended Answers

All 2 Replies

You can set the date format for your server using the SET DATEFORMAT function, but this will set the format for all dates in your system. I think the best way to go for you is to store the full date in the database (or even just 1-Aug-10 for all dates in August 2010) then parse them accordingly in your VB6 application.

I would also suggest that you store the whole date and the then just take present the month and date.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.