473,509 Members | 3,095 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to autogenerate date

24 New Member
i am using a gridviw to display values from database

and using formview to insert values to gridview

i have the following fields in formview during insert mode like

Name :
StartDate:
EndDate:

now when i enter the startdate
the Enddate should automatically add 7 days to startdate and get inserted

if its textbox i know we can add like

DateTime.Now.Add(7);

but for a field in formview is it possible to do that
plz help me on this regard

Rama
May 25 '07 #1
2 1074
prabunewindia
199 New Member
hi friend,
i didn't get u clearly.
i think u have only the start date in table(database)
u want display the end date also in the form view!
so u get this in the query(sql) itself
select name, startDate, startDate+7 as endDate from <table>

i am not clear that with query (+7) not exactly correct.
u search for exact query.

in alternate method
u code in html page in the field's text propert as Eval(date+7)
i gave u only idea. not code
try to convert this to code
Prabu
May 25 '07 #2
klaydze
30 New Member
i am using a gridviw to display values from database

and using formview to insert values to gridview

i have the following fields in formview during insert mode like

Name :
StartDate:
EndDate:

now when i enter the startdate
the Enddate should automatically add 7 days to startdate and get inserted

if its textbox i know we can add like

DateTime.Now.Add(7);

but for a field in formview is it possible to do that
plz help me on this regard

Rama
hi, try this one. assuming that i put the value of the date in textbox
txtdate.text=format(Now.AddDays(7),"MM/dd/yyyy")
May 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5977
by: m_evergreen | last post by:
I would like the numbers 000001 to 999999 to autogenerate in a new database. I will be transfering information from another database and in that database the numbers 000001 to 010000 are already...
0
1676
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray...
2
864
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray...
1
1727
by: ypul | last post by:
Hi , Getting to the point directly, my query output doesnt have fixed columns , so I choosed "autogenerate columns" datagrid. I assign this dataset to my datagrid, but now I want my data should...
2
1457
by: serge calderara | last post by:
Dear all, I have a datagrid which bind to a dataset object Datagrid autogenerate propertie is set to True. I need to create the first column of my grid to be used as an hyperlink and sending...
2
8848
by: hazz | last post by:
in a databound scenario I have a database column value that is of type varchar with 3 discrete text values. Binding to this table column with autogenerated columns displays the text values in a...
1
11738
by: Dhruba Bandopadhyay | last post by:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm....
0
1837
by: yahiko | last post by:
Hello We have a large table of about 1.5M rows inserted per week. The expecte size is near 5 GBys per year. is there a form to autogenerate a partition by day in this table??? We have a date...
3
1924
by: Brett Wickard | last post by:
Anyone know of a good way to autogenerate stored procedure parameters to put into c# code? I don't need to do it on the fly, just while coding. I've got some SPs with a lot of parameters, so it...
2
1842
by: aarti83 | last post by:
hello, i m developing a small project. but i m having some problems in that. plz if any one can help i will be very thankfull. i m using access as backend. 1)i want to auto generate nos in...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.