pechettysuguna
Programmer
Hi!
I am doing the project in VB and SQL as a Backend. This is my first project in VB.
Problems:--
1) Helding dates.
a) How to give a text fields date validation in "DD/MM/YYYY" format (like Foxpro on key press)?
b) As well as in SQL, how to set the date datatype in "DD/MM/YYYY" format ?
c) How to give the default date in SQL. Since if the date field is kept blank, it gives an error in INSERT Statement.
2) How to add months to a date?
I have a start date. To this day I am adding 183 days, 365 days, 549 days, 730 days, 913 days, 1095 days to get six different date after a interval of 6 month. But due to leap year it is not giving me the exact date which I required.
I got this ** = DateAdd("M", 12, Me.[PurchaseDate]) ** from U R site. I hope it works properly.
Regards,
Suguna.
I am doing the project in VB and SQL as a Backend. This is my first project in VB.
Problems:--
1) Helding dates.
a) How to give a text fields date validation in "DD/MM/YYYY" format (like Foxpro on key press)?
b) As well as in SQL, how to set the date datatype in "DD/MM/YYYY" format ?
c) How to give the default date in SQL. Since if the date field is kept blank, it gives an error in INSERT Statement.
2) How to add months to a date?
I have a start date. To this day I am adding 183 days, 365 days, 549 days, 730 days, 913 days, 1095 days to get six different date after a interval of 6 month. But due to leap year it is not giving me the exact date which I required.
I got this ** = DateAdd("M", 12, Me.[PurchaseDate]) ** from U R site. I hope it works properly.
Regards,
Suguna.