Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Left Padding with zeros
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00562854
Message ID:
00562858
Views:
21
>I'm trying to create a file name with the current month and day in the file name and need to force leading zeros for the month and day. I tried "TRANSFORM", but it didn't work. Any suggestions?
>
>Thanks,
>
>Harry

You can use PADL() function
lcFileName = "file" + PADL( DAY( DATE()), 2, "0") + PADL( MONTH( DATE()), 2, "0")
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform