|
MyDate = StringUpper(dateTimeString("localTime?", True))
/ h' [8 r, f: mMyDay = subString(MyDate, 9, 10)
# l, u- e! r3 S) ?& X1 g" A qMyMonth = subString(MyDate, 5, 7)/ H) x3 {1 i0 ^+ y
MyYear = subString(MyDate, 21, 25)0 |; S% B5 M, E/ x+ y
MyTimeStamp = MyDay + " " + MyMonth + " " + MyYear' J$ N; h' p, S1 Z. j4 ]. m
上述表达式在UG7.0中是可以输进去的,就是下面的这一段总是输不进去,我试着改了几处也不行,知道的网友说下为什么在UG7.0中就输不进去呢,下面这段字符串表达式在UG8.0中就没问题
6 E" x% S" n6 S# K0 n( \! RB= If(subString(dateTimeString("localTime?",True),5,7)="Jan")
" i4 B+ W/ U0 N
: f' Z6 n. ]( _5 j: Q("01")' S% R, a( H6 o+ t7 x0 f
2 S' T9 [ V1 t* F
ElseIf(subString(dateTimeString("localTime?",True),5,7)="Feb")- v" j/ c# e. `: M) j |
, x6 n8 `& b0 {7 |& J5 c
("02")7 @" |( s8 V( d3 g0 h- X6 F
: W& J% x, U+ Y3 k0 `! eElseIf(subString(dateTimeString("localTime?",True),5,7)="Mar")
) ~; A5 d) t6 Z$ v' t( `& E! d" N0 Q" I! J1 r
("03")8 }9 z. P! x& Z& P; q
; t4 i( W3 W7 L6 \0 ?! ^/ iElseIf(subString(dateTimeString("localTime?",True),5,7)="Apr")
3 A F6 h. J6 t) y7 ?
0 K; M9 y4 ~7 @6 ?: S7 @7 d("04")$ k3 @, x7 x( c3 j# r
3 }9 d! {# {9 N: c& E+ ^$ G0 bElseIf(subString(dateTimeString("localTime?",True),5,7)="May")5 e0 b" ~, V% ~4 M) a& k, a
: X- `# Z4 X% Z) u! K4 z2 l("05")
* O- d" B+ R/ F( S1 T& D! S2 B
' ~: R7 k5 x2 W7 pElseIf(subString(dateTimeString("localTime?",True),5,7)="Jun")8 p* D% _7 U. ?
( `; `. T) a& \# W% `
("06")
9 ?$ h+ x% d+ x/ `$ F: \/ |! F6 n/ C0 c) V
Else If(subString(dateTimeString("localTime?",True),5,7)="Jul")8 I: O d1 @4 L' z6 {* C4 {
?6 T' n$ z+ {# C$ M6 n' i8 {
("07")
9 I: b; [6 D: y+ `8 z& W& `/ _ Y3 A" N0 Q# |- C: m6 S* J
ElseIf(subString(dateTimeString("localTime?",True),5,7)="Aug")
3 D/ ]' g) ?. L$ M4 H& P! r+ S# @
("08")
o3 S& Q5 X# D- W
$ w1 ?, q9 ?. A; @ElseIf(subString(dateTimeString("localTime?",True),5,7)="Sep")& g. r" w$ Y$ J
+ D" _# ~6 @& [, T; R0 ?
("09")
# G9 S" N7 `; V1 `% O# a; i5 w
5 w0 X9 s! A3 i6 ]4 gElseIf(subString(dateTimeString("localTime?",True),5,7)="Oct")
1 @0 _, [1 ]) G& {. E+ q) f) c _! |) R9 J
("10")7 r& X* [% z, v: B% Y
, N$ t" } W& E: T
ElseIf(subString(dateTimeString("localTime?",True),5,7)="Nov")
& w: @3 c2 N- M8 C. b% H; c
' _. I. p- l. U- j2 v("11"): [7 {, @' }: T9 |" q o% q; M1 G
8 t. [9 N: E% p6 p
Else("12")1 z9 ^# q8 P( x2 e) g% @& K
Date=A+“.”B+“.”+C - e3 x+ J4 K# T( u4 O% n
2 R' y7 Y7 {- I) M+ ?8 `' k |
|