Item

ItemGetD

Return the date of a value

Syntax

Signature
int ItemGetD( const ITEM *item );

Arguments

item Value to read.

Return value

The stored YYYYMMDD integer, or 0 for NULL or a value of another type.

Description

Reads an IT_DATE value produced by ItemPutD() without formatting or parsing it.

Example

itemgetd.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   ITEM *item = ItemNew( NULL );

   if( !item )
      return 1;

   ItemPutD( item, 19901010 );
   printf( "%s\n", DToS( ItemGetD( item ) ) );
   ItemRelease( item );

   return 0;
}