Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Month's abbreviated name to digits
#4
C# is your friend so easy to parse dates 
i also had it output just the numeric month as another example 
Using c# dont need to break the date apart can process it all together and customize output
Function ParseDateExampleCs
Code:
Copy      Help
_s.timeformat("{dd-MMM-yy}" 0)
out _s
str code=
;using System;
;using System.Globalization;
;public class Example
;{
;,,public static string StaticFunc(string date)
;,,{
;,,,,DateTime parsedDate = DateTime.Parse(date);
;,,,,Console.WriteLine(parsedDate.ToString("MM"));
,,,,;return parsedDate.ToString("dd/MM/yy");
;,,}
;}
str R=CsFunc(code _s)
out R
for more info see
Standard Date and Time Format Strings

Parsing Date and Time Strings in .NET


Custom Date and Time Format Strings


Messages In This Thread
Month's abbreviated name to digits - by ssimop - 08-14-2018, 10:23 AM
RE: Month's abbreviated name to digits - by Kevin - 08-14-2018, 08:30 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)