Yeah
My syntax is correct according to that.

Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
From: [email protected] [mailto:[email protected]] On Behalf Of James Bentley
Sent: Wednesday, September 05, 2012 4:48 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: FORMAT Question

From RBase Help:
"
FORMAT

[http://www.rsyntax.com/rbg95/button_prev.gif]<http://www.rsyntax.com/rbg95/float_functions_3.htm>

[http://www.rsyntax.com/rbg95/button_next.gif]<http://www.rsyntax.com/rbg95/set_format_aligningdecimals_2.htm>



(FORMAT (value,'picture-format'))

Prints picture formats to a variable, rather than only to the screen. You can 
use FORMAT anywhere that you can use a function. The result of the FORMAT 
function is always text.

In the syntax for this function, value is the value you want to be displayed in 
a particular format; it can be a column, variable, or a constant value. 
'Picture-format' is the picture format you establish.

The FORMAT function can be useful in several ways:

•

Aligning decimals

•

Capturing date and time using system variables


•

Formatting currency

•

Formatting text


•

Punctuating long numbers


The characters you can use to format your data are listed below.

For All Data

[<]

Data is left justified.

[>]

Data is right justified.

[^]

Data is centered.


For Numbers

[-]

Places a minus sign to the right of a negative number.

[DB]

Places DB to the right of a negative number.

[( )]

Encloses a negative number in parentheses.

[CR]

Places CR to the right of a positive number.

9

Fills unused space with blanks.

0

Fills unused space with zeros.

*

Fills unused space with asterisks.


For Text

_

Letters are uppercase; other characters are blank.

|

Letters are lowercase; other characters are blank.

%

Letters are uppercase; other characters are unchanged.

?

Letters are lowercase; other characters are unchanged.


For Dates

MMDDYYYY

Displays the month, day, and year

MM

Displays the month

DD

Displays the day

YYYY

Displays the year

WWW

Displays the day name, with a 3-letter abbreviation

WWW+

Displays the full name for the day of the week

MMM

Displays the month name, with a 3-letter abbreviation

MMM+

Displays the full name for the month

CC

Displays the century, AD or BC

any combination

Any combination of the month, day and year can be used.


For Times

HHMMSS

Displays the hour, minute, and second

HH

Displays the hour

MM

Displays the minute

SS

Displays the second

.SSS

Displays thousandths of a second

AP

Displays AM or PM when using a 12-hour format

any combination

Any combination of the hours, minutes, and seconds can be used.

NN

Displays minutes (when capturing date and time using 
#NOW<http://www.rsyntax.com/rbg95/rbtisystemvariables.htm>)


See Also:"

When formatting a DATETIME  value use "NN" instead of "MM" of the Times value 
shown above.

Jim Bentley,
American Celiac Society
1-504-737-3293
________________________________
From: Dennis McGrath <[email protected]<mailto:[email protected]>>
To: RBASE-L Mailing List <[email protected]<mailto:[email protected]>>
Sent: Wednesday, September 5, 2012 2:28 PM
Subject: [RBASE-L] - Re: FORMAT Question


Doug,

FORMAT does not use the same conventions.

Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]<mailto:[email protected]>
From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]]<mailto:[mailto:[email protected]]> On Behalf Of Doug 
Hamilton
Sent: Wednesday, September 05, 2012 1:45 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: FORMAT Question

Dennis, I was going through old emails last night and found this from '04.
Not sure if it helps, maybe some clues?
Doug
This a list of values for DateTime Picker Format property

Element       Description
d             The one- or two-digit day.
dd            The two-digit day. Single-digit day values are preceded by a zero.
ddd           The three-character weekday abbreviation.
dddd          The full weekday name.
h             The one- or two-digit hour in 12-hour format.
hh            The two-digit hour in 12-hour format. Single-digit values are 
preceded by a zero.
H             The one- or two-digit hour in 24-hour format.
HH            The two-digit hour in 24-hour format. Single-digit values are 
preceded by a zero.
m             The one- or two-digit minute.
mm            The two-digit minute. Single-digit values are preceded by a zero.
M             The one- or two-digit month number.
MM            The two-digit month number. Single-digit values are preceded by a 
zero.
MMM           The three-character month abbreviation.
MMMM          The full month name.
s             The one- or two-digit second.
ss            The two-digit second. Single-digit values are preceded by a zero.
t             The one-letter AM/PM abbreviation (that is, AM is displayed as 
"A").
tt            The two-letter AM/PM abbreviation (that is, AM is displayed as 
"AM").
yy            The last two digits of the year (that is, 1996 would be displayed 
as "96").
yyyy          The full year (that is, 1996 would be displayed as "1996").


On 9/5/2012 1:26 PM, Dennis McGrath wrote:
Set var vTest = (FORMAT(.#NOW,'YY_MM_DD__HH_NN_SS.SSS'))
I get the a value like this:  12_09_05__12_59_34.SSS
How do I get the milliseconds to show correctly?
I guessed about the NN for the minutes.


Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]<mailto:[email protected]>


Reply via email to