Formatting date time to print

shruts

Member
Joined
Sep 13, 2011
Messages
7
Programming Experience
1-3
I have a listview that displays date and time from a range that is set from combo boxes: "Start Date" and "End Date".

Then I am printing a block that display Cycle time. This cycle time is coming from "Start Date" and "End Date". I want to change the format of the item displayed in list view after it is printed in the print block in the format as "mm-dd-yyyy".

Any help is appreciated!
 

ProtekNickz

Well-known member
Joined
Oct 22, 2009
Messages
117
Location
UK
Programming Experience
1-3
this is quite a simple process, here is the code to show you the format.

Dim somedate As String
somedate = Format(Now.Date, "dd|MM|yyyy") the dd = Days MM = Months YYYY = Year, the MM has to be upprecase, also the "|" is just a seperator you can use any character you feel the need to use
 
Top Bottom