+ Reply to Thread
Results 1 to 6 of 6

Thread: Converting Date in /Free

  1. #1
    Guest.Visitor Guest

    Default Converting Date in /Free

    In V5R2, you can do this: Date8s0 = %Uns(%Char(%Date():*ISO0)); In V5R1, you can't use %UNS like this, so you have to overlay an 8a with an 8s0. Chris Ringer RingerContracting@yahooo.com

  2. #2
    Guest.Visitor Guest

    Default Converting Date in /Free

    We run V5R1, and to get the current date into an 8,0P field I generally use something like this...
    Code

  3. #3
    dolfan Guest

    Default Converting Date in /Free

    Thanks Chris & Kev. We just went to V5R2 a few months ago and the %Uns is just the type of solution I was looking for.

  4. #4
    JeffWilson Guest

    Default Converting Date in /Free

    I think I missed something. The example that Kevin gave you didn'tt reference %UNS at all. How would you use it to convert to CCYYMMDD for a date? Thanks!

  5. #5
    dolfan Guest

    Default Converting Date in /Free

    I need to get the current date into a numeric field, in format CCYYMMDD, with no separators. I am trying to do this in /Free so moving the date field to the numeric field is out. (That would be the easiest in my mind.) But since the 'Move' instruction is not allowed, I am struggling to find the easiest solution in /Free format. Any ideas would be appreciated. TIA Bryan

  6. #6
    Guest.Visitor Guest

    Default Converting Date in /Free

    The request is to get the current system date into a numeric field in /FREE. I get the current system date into a numeric field like this: Date8s0 = %Uns(%Char(%Date():*ISO0)); 1. %Date() gets the current system date in ISO format YYYY-MM-DD. 2. %Char() converts ISO date into 8a character field like this 'YYYYMMDD' 3. %Uns or %Int converts a character field to a numeric field like 'YYYYMMDD' to YYYYMMDD Chris

+ Reply to Thread

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2007, 07:18 AM
  2. Replies: 7
    Last Post: 10-02-2004, 03:49 PM
  3. Converting Julian Date to mm/dd/yy in query
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 09-28-2000, 02:14 PM
  4. Converting a BigDecimal into a date
    By Guest.Visitor in forum Programming
    Replies: 2
    Last Post: 08-24-2000, 12:10 PM
  5. Converting Date to Julian
    By Guest.Visitor in forum Programming
    Replies: 2
    Last Post: 01-07-1999, 03:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts