Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create fixed-length ASCII file
Message
De
23/07/2001 16:26:49
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
 
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00534032
Message ID:
00534077
Vues:
14
The following code is lengthy but it is this way to epxlicity show you all that is being done. It takes numeric and date data types and right alligns them into one string. Check your immediate window (put a breakpoint on the End Sub line) for the output. Cheers.

Private Sub Command1_Click()
Dim x As String * 10
Dim y As String * 16
Dim z As String * 26

Dim num1 As Long
Dim num2 As Long
Dim date1 As Date
Dim date2 As Date

num1 = 123456
num2 = 123
date1 = Date
date2 = Date

RSet x = Str(num1)
RSet y = Format(date1, "mm-ddd-yyyy")
z = x & y
Debug.Print z

RSet x = Str(num2)
RSet y = Format(date2, "mm-ddd-yyyy")
z = x & y
Debug.Print z

End Sub
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform