Results 1 to 2 of 2


  1. #1
    Sreenivasa Murthy Guest


    How can I insert Date into sql server database. I am using 3 textboxes for day,month and year. And how can control date format of regional setting through coding.<BR><BR>Reply soon<BR>Thanking you

  2. #2
    DaveL Guest

    Default RE:

    Regarding the second part of your question, try using this:<BR><BR>&#060;%<BR>Sub ShowUKdate()<BR><BR> dim dateStr, UKdate<BR> dateStr=split(date,"/")<BR><BR>&#039add leading zero to single figures<BR><BR> if Len(dateStr(0))&#060;2 then<BR> dateStr(0)="0"&dateStr(0)<BR> end if<BR><BR> if Len(dateStr(1))&#060;2 then<BR> dateStr(1)="0"&dateStr(1)<BR> end if<BR><BR> dateStr(2)=right(year(now),2)<BR><BR> if Int(dateStr(0))=month(now) then<BR> UKdate=dateStr(1)&"/"&dateStr(0)&"/"&dateStr(2)<BR> else<BR> UKdate=join(dateStr,"/")<BR> end if<BR><BR> response.write UKdate<BR>End Sub<BR><BR>%&#062;<BR><BR><BR>The date in the UK is &#060;% ShowUKdate %&#062;<BR><BR>(I&#039ll leave the SQL question to the SQL experts)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts