Right ( "0" & Month ( Billing_Info::Sent_Date ) ; 2 )
Let ( [
F1 = Billing_Info::Sent_Date ;
F2 = Right ( "0" & Month ( F1 ) ; 2 ) ;
F3 = Right ( "0" & Day ( F1 ) ; 2 ) ;
F4 = Year ( F1 ) ;
F5 = F2 & "_" & F3 & "_" & F4 ;
F6 = If ( Not IsEmpty ( F1 ) ; F5 )
] ; F6 )
As per PMJ's post. Same for Day of course—
date = "01/01/2017"
; mn = Right (0 & Month ( date ) ; 2 )
; dy = Right (0 & Day ( date ) ; 2 )
; yr = Year ( date )
; result = mn & dy & yr
Result in the above is 01012017. Substitute the hardcoded date with your date field and you are good to go.
2 of 2 people found this helpful
Rather than m-d-y on the Text file name, I always use:
It's alpha-sortable should you save/write the same file on different dates.
I'll even use
appended should the same file need to be saved in the same day.
Sent from miPhone
I even go one further and store it like most SQL dates are stored: YYYY-MM-DD and usually include a prefix and suffix character before and after the date to make it easier to read. I normally use an underscore for this purpose.
yes, I add "_" before the date, but the "-" separator can make the filename longer than necessary. if you need to parse back out the code is 8 characters exactly.
Brilliant, works like a charm.
Thank you everyone.
1 of 1 people found this helpful
Late to the show but +1 to Beverly for the "yyyymmdd".
year(the date) * 10^4 + month(the date) * 10^2 + day(the date) //Dr. Ray IIRC.
"Good design doesn't date." ~Harry Seidler