codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  format date/time to return to database - second attempt  joshuagoshert at 23:41 on Thursday, October 05, 2006
 

Something screwed up on me when I clicked post, hopefully it'll work this time...

I have a form for manual overrides of the automatic entries into a timeclock database.

The source record is in the date/time format and receives an auto timestamp of Now() when the user clocks in/out. It is being stored in the format mm/dd/yyyy hh:mm:ss (A/P)M.

I make dateIn = the record, and then split it up for editing:
varDD = int(dateIn)
varHH = hour(dateIn)
varMM = minute(dateIn)
varAPM = right(dateIn,2)

after the form is submitted, I am trying to regroup the changes and put it back in my record.

This is what I've tried, and I don't know what else I can do:
var5 = (cstr(varDD) & " " & cstr(varHH) & ":" & cstr(varMM) & ":00 " & cstr(varAPM))
if I then try to cdate(var5) all I get is the vbshortdate format, and I need the hours and minutes. How do I do this? Is there a way to reverse the formatDateTime(_,0) function? Help...








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Select index`s and HTML Forms
•  Re: How to change the location?
•  Re: How can I read ASCII data file in C++
•  Display new link everyday for whole year in a sequence
•  sending soap requests
•  New to Data Access Classes
•  format date/time to return to database - second attempt
•  format date/time to return to database
•  Trying to create a C++ Object Oriented game


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2006