Hi,

Date and Time Formatted Input and Output

 

Try to use a sample like this

#include <boost/date_time/gregorian/gregorian.hpp> 
#include <iostream> 
#include <locale> 
 
int main() 
{ 
  boost::gregorian::date d(2009, 1, 7); 
  boost::gregorian::date_facet *df = new boost::gregorian::date_facet("%A, %d %B %Y"); 
  std::cout.imbue(std::locale(std::cout.getloc(), df)); 
  std::cout << d << std::endl; 

}

When compile I get

[BCC32 Error] Unit1.cpp(86): E2316 'date_facet' is not a member of 'boost::gregorian'

 

Appreciate any help.

//Christer