problem with Format and a user defined date format 
Author Message
 problem with Format and a user defined date format

Given the date "2000-07-27 11:45",
I need a string "20000727_11\0727"

Format("2000-07-27 11:45", "yyyymmdd_hh\\mmdd") returns
"20000727_11\4527"

From vb help:
mm Display the month as a number with a leading zero (01 - 12). If m
immediately follows h or hh, the minute rather than the month is displayed.

Is the string I need possible to generate with a single call to Format?

Thanks,

Michael Keller



Mon, 13 Jan 2003 03:00:00 GMT  
 problem with Format and a user defined date format
"Michael Keller" <nospam>'s wild thoughts were released on
Thu, 27 Jul 2000 11:51:53 -0400 bearing the following fruit:

Quote:
>Given the date "2000-07-27 11:45",
>I need a string "20000727_11\0727"

>Format("2000-07-27 11:45", "yyyymmdd_hh\\mmdd") returns
>"20000727_11\4527"

>From vb help:
>mm Display the month as a number with a leading zero (01 - 12). If m
>immediately follows h or hh, the minute rather than the month is displayed.

>Is the string I need possible to generate with a single call to Format?

>Thanks,

Format("2000-07-27 11:45", "yyyymmdd_hh") & "\" &
Format$("2000-07-27 11:45", "mmdd")

D



Tue, 14 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. User-defined Clipboard Formats in Visual Basic 4/5

2. Using CDate with user-defined formats

3. MS-ACCESS query date problem + date formatting in datagrid

4. formatting a text box to long date format

5. How to convert number format to date format

6. Date Format Style/format

7. Format for blank res. for zero Date format

8. Date format in a user form

9. Check user entry of the correct date format

10. Help: Force User to Enter Date in Required Format

11. Problems using format and format$ functions

12. date formatting problem

 

 
Powered by phpBB® Forum Software