Author |
Topic |
|
kolucoms6
Average Member
845 Posts |
Posted - 23 March 2008 : 14:08:56
|
quote:
<% if adrs("cbdate")= Date then Response.write "****" End if %>
cbdate is a datefield.
In my Access, it displays as 21/03/2008.
But above comparison is not working ...
What can be the reason ?
Also,
quote:
<textarea rows="14" name="txtQCRemarks" cols="70"><% = adRsCustInfo("QCRemarks") & Date %></textarea>
I want to insert a break between adRsCustInfo("QCRemarks") and Date.
How to do that ?
|
Edited by - kolucoms6 on 23 March 2008 14:09:32 |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 March 2008 : 14:21:11
|
kolucoms6, you are very good at not giving enough information for people to answer your qusetions which is why you don't get many answers, people just can't be bothered to try and work out what you want.
1) you need to tell us what Date is, and maybe do a response.write Date to see how it displays, your biggest problem is that really you shouldn't store dates in access as date fields and then try and compare them to something other than a date field in access, that is why the forum converts all dates to a string representation befor doing anything with them
2) what do you mean by a break? do you mean a space or a newline ? |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 23 March 2008 : 14:40:31
|
Excuse me for my confusing words.
1) Currently I am already using "Date" datatype format in current project.
In front end date display as
3/23/2008
In DB it saves as
23/03/2008
2) For "break", below code will work ?
<textarea rows="14" name="txtQCRemarks" cols="70"><% = adRsCustInfo("QCRemarks") & vbCrLf & Date %></textarea>
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 March 2008 : 14:44:24
|
1) that is one of the main reasons not to use date fields, basically your db is saving UK dates but asp is using US dates, you will have to parse them to find out if they are the same.
2) why not just try it rather than asking ? |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 23 March 2008 : 14:50:01
|
Any way to convert UK date format to US date format using some ASP code/function ? |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 23 March 2008 : 14:53:09
|
US to UK date format :
strUK = Day(strUS) & "/" & Month(strUS) & "/" & Year(strUS) |
|
|
|
Topic |
|