Re: date formatting

From: Paula Doubrawa <pdoubraw_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 31 2013 - 12:32:23 MDT

Hey, Brian
Have you looked into cd_string ? You can perhaps convert to a numerical
date format first, than back to string formatting it the way you want.

http://www.ncl.ucar.edu/Document/Functions/User_contributed/cd_string.shtml

On Thu, Oct 31, 2013 at 2:28 PM, Brian McNoldy <bmcnoldy@rsmas.miami.edu>wrote:

> I was wondering if there's an elegant method to convert date date/time in
> the format YYYYMMDDHH to DMonYYYY HH (e.g. 2013100112 --> 1Oct2013 12)?
> Basically, to define in an input format and an output format.
> I'm currently extracting substrings for each field, and using 12 if
> statements to switch from MM to Mon. Not a big deal of course, but I
> didn't know if there are any existing functions that might be able to
> handle this... I couldn't spot any.
>
> Thanks,
> Brian
> --
> Brian McNoldy
> Senior Research Associate
> ============================
> University of Miami
> Rosenstiel School of Marine & Atmospheric Science
> Phone: (305) 421-4272
> http://andrew.rsmas.miami.edu/bmcnoldy/
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 31 12:32:34 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 01 2013 - 08:58:14 MDT