Hi all,
Working with existing database that every message includes date/time. I'm now trying to break up strings and print them into 2 separate lines which include:
line 1: date (and time (if any))
line 2: message
output according to the code:
» 05/04/07:
4/07: wewcfrf3rt
» 05/04/07:
yguykguykftycftu
» 05/04/07:
07: ghcghcguyk
» 10/30/2007 11:54:06 A
/30/2007 11:54:06 AM: Testing
getting from here in db
» 05/04/07: wewcfrf3rt||» 05/04/07: uiguyguykguykftycftu||» 05/04/07: ghcghcguyk
||» 10/30/2007 11:54:06 AM: Testing
Anyway, I'm trying to create cases for existing data with DATE alone and new saved data with full Timestamp into the message.
Thanks
Working with existing database that every message includes date/time. I'm now trying to break up strings and print them into 2 separate lines which include:
line 1: date (and time (if any))
line 2: message
Code:
response.write "<table cellspacing='2' cellpadding='10' width='100%'>"
strTxt = split(trim(solution),"||")
For x=0 to ubound(strTxt)
response.write "<tr><td style='border:1px solid #006699'>"
'preStr = instr(strTxt(x),"M:")
'postStr= instr(strTxt(x),":") + 1
if instr(strTxt(x),"AM:")>0 or instr(strTxt(x),"PM:")>0 then
if instr(strTxt(x),"AM:") then
breakpoint = instr(strTxt(x),"AM:")
else
breakpoint = instr(strTxt(x),"PM:")
end if
else
breakpoint = instr(strTxt(x),":")
end if
response.write Left(strTxt(x),breakpoint) & "<BR>"
response.write Right(strTxt(x),breakpoint)
response.write "</td></tr>"
Next
response.write "</table>"
output according to the code:
» 05/04/07:
4/07: wewcfrf3rt
» 05/04/07:
yguykguykftycftu
» 05/04/07:
07: ghcghcguyk
» 10/30/2007 11:54:06 A
/30/2007 11:54:06 AM: Testing
getting from here in db
» 05/04/07: wewcfrf3rt||» 05/04/07: uiguyguykguykftycftu||» 05/04/07: ghcghcguyk
||» 10/30/2007 11:54:06 AM: Testing
Anyway, I'm trying to create cases for existing data with DATE alone and new saved data with full Timestamp into the message.
Thanks