Print Page | Close Window

Combining Date/Time to DB

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8134
Printed Date: 28 March 2026 at 9:02am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Combining Date/Time to DB
Posted By: aalavar
Subject: Combining Date/Time to DB
Date Posted: 16 December 2003 at 11:24am

Hi all... I have a quick question I can't seem to resolve.

I have two text variables, one for date ('mm/dd/yyyy'), one for time ('hh:mm').  How can I enter this into the database as one variable that includes the date and time (i.e. like using Now() would)?




Replies:
Posted By: michael
Date Posted: 16 December 2003 at 1:11pm
<%
itime = "12:25"
idate = "12/12/2003"
Response.Write CDate(idate & " " & itime)
%>

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: aalavar
Date Posted: 16 December 2003 at 1:45pm

Well it worked with some modifications, thanks =)

I changed the time to add seconds and am/pm, and it's showing up correctly in the db!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net