Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 25th, 2005, 03:21 PM
Authorized User
 
Join Date: May 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default date time format

i am doing a project in VB6 i learned in VB6 but moastly use VB.net so if this is easy jsut tell me and ill psot in beggining vb forum. anyway i want to format the date/time to Year Month DAy HOur:Minute:Second i also want it to be in military time. Ty for any hekp provided

~~~~~~~~~~~~~~~~~~~~~
I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter.
__________________
~~~~~~~~~~~~~~~~~~~~~
I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter.
 
Old July 26th, 2005, 12:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is in VB:
format(now, "yyyy mm dd hh:nn:ss")
sorry but I do not know the military time format
Marco
 
Old July 26th, 2005, 01:03 PM
Authorized User
 
Join Date: May 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ty very much

~~~~~~~~~~~~~~~~~~~~~
I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter.
 
Old July 26th, 2005, 01:25 PM
Authorized User
 
Join Date: May 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

in case you where wondering i figured it out after a little of the usual programing feelings :(:( but after that i got this.

Private Sub clocker_timer()
    Dim message as string
    Dim message2 as string
    message = FormatDateTime(now, vbShortTime)
    message2 = Format(now, "yyyy mm dd " & message & ":ss")
    clock.text = "AEW " & message2
End Sub
Any q's on why i did what ill be happy to explain bec it seems round/about but it was the shortest i could ocme up with.
Ty for your help again btw.

~~~~~~~~~~~~~~~~~~~~~
I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter.
 
Old December 18th, 2009, 08:16 AM
Registered User
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

using format function u could show the time in military format which is the 24 hours format as opposed to the 12 hours format

Code:
Dim msg As String
msg = Format(Now, "yyyy mm dd h:m:s")
MsgBox msg





Similar Threads
Thread Thread Starter Forum Replies Last Post
Date/Time format & multiple selection with listbox frmsasp ASP.NET 1.0 and 1.1 Basics 0 October 13th, 2005 05:50 AM
Using xs:time to generate time in desired format krayan001 XSLT 0 June 27th, 2005 04:28 PM
Behavior of Date/Time Format Differs When Accessed Oliver Dempsey Classic ASP Basics 25 May 2nd, 2005 01:24 AM
Format Date to time field KennethMungwira VB.NET 3 November 17th, 2003 11:48 AM
Format Date Time ganesh15 PHP How-To 2 August 20th, 2003 05:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.